fix anchors
authoralfadur
Fri, 17 May 2019 01:32:51 +0300
changeset 14986 1a2dcea1732a
parent 14985 f359d8f86501
child 14987 980a948a5dff
fix anchors
hedgewars/uLandObjects.pas
--- a/hedgewars/uLandObjects.pas	Thu May 16 23:04:19 2019 +0200
+++ b/hedgewars/uLandObjects.pas	Fri May 17 01:32:51 2019 +0300
@@ -536,10 +536,12 @@
         if bRes then
             begin
             anchored:= anchorcnt = 0;
-            for i:= 1 to anchorcnt do
+            i:= 0;
+            while i < anchorcnt do
                 begin
                     anchored := CheckLandAny(anchors[i], x, y, lfLandMask);
                     if anchored then break;
+                    inc(i);
                 end;
             bRes:= anchored;
             end;