From f769e1b2443c46ba40ad98a391f6e23bcdda4c8f Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 6 Mar 2016 06:56:53 +0100 Subject: fixed possible division by zero --- coreengine/animation.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'coreengine/animation.c') diff --git a/coreengine/animation.c b/coreengine/animation.c index fb88ab6..863527c 100644 --- a/coreengine/animation.c +++ b/coreengine/animation.c @@ -277,6 +277,8 @@ void cAnimation::Shift(void) { int frametime = 1000 / FPS; int steps = (double)shifttime / (double)frametime; + if (steps < 2) + return; int stepXLinear = 0; int stepYLinear = 0; if (shiftstart.X() == shiftend.X()) { -- cgit v1.2.3