From: Holger Schemel Date: Sat, 2 Apr 2016 08:13:39 +0000 (+0200) Subject: fixed bug with drawing animations with negative or zero width/height X-Git-Tag: 4.0.0.0-rc1~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=69ec0335692c5e18ca09c091df5a75f022f503f7;p=rocksndiamonds.git fixed bug with drawing animations with negative or zero width/height --- diff --git a/src/cartoons.c b/src/cartoons.c index 1d175186..e6b622dc 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -583,6 +583,9 @@ void DrawGlobalAnimExt(int drawing_stage) else if (part->y > part->viewport_height - g->height) height -= (part->y - (part->viewport_height - g->height)); + if (width <= 0 || height <= 0) + continue; + dst_x += part->viewport_x; dst_y += part->viewport_y;