hedgewars/VGSHandlers.inc
changeset 4452 258945553b18
parent 4421 58c6918acde4
child 4473 b6487d2c15ad
--- a/hedgewars/VGSHandlers.inc	Thu Dec 02 19:51:30 2010 -0500
+++ b/hedgewars/VGSHandlers.inc	Thu Dec 02 20:29:46 2010 -0500
@@ -630,7 +630,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
-var tmp: byte;
+var tmp: LongInt;
     i: LongWord;
 begin
 with Gear^ do
@@ -645,6 +645,8 @@
                 else dec(tmp);
                 if tmp < round(dX) then tdY:= 1;
                 if tmp > round(dY) then tdY:= -1;
+		if tmp > 255 then tmp := 255;
+		if tmp < 0 then tmp := 0;
                 Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or tmp
                 end
             end