hedgewars/uGearsUtils.pas
changeset 7509 76e3a3fc17cd
parent 7492 3188794b9d87
child 7592 cf67e58313ea
--- a/hedgewars/uGearsUtils.pas	Sun Aug 05 20:18:16 2012 -0400
+++ b/hedgewars/uGearsUtils.pas	Mon Aug 06 10:18:57 2012 -0400
@@ -510,7 +510,7 @@
     count: LongInt = 0;
 begin
     if (y and LAND_HEIGHT_MASK) = 0 then
-        for i:= min(x + r, LAND_WIDTH - 4) downto max(x - r, 0) do 
+        for i:= max(x - r, 0) to min(x + r, LAND_WIDTH - 4) do
             if Land[y, i] and mask <> 0 then
             begin
                 inc(count);