hedgewars/uGears.pas
changeset 7721 2b1ad418ba39
parent 7669 a85e1c167b69
child 7730 2013733f9ca9
--- a/hedgewars/uGears.pas	Mon Oct 01 00:31:38 2012 +0400
+++ b/hedgewars/uGears.pas	Mon Oct 01 12:01:39 2012 +0400
@@ -653,8 +653,8 @@
 snowLeft:= -(snowRight-LAND_WIDTH);
 
 if not hasBorder and ((Theme = 'Snow') or (Theme = 'Christmas')) then
-    for i:= vobCount * max(LAND_WIDTH,4096) div 2048 downto 1 do
-        AddGear(GetRandom(snowRight-snowLeft)+snowLeft, LAND_HEIGHT-1300+GetRandom(750), gtFlake, 0, _0, _0, 0);
+    for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do
+        AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LongInt(LAND_HEIGHT + GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0);
 end;