Fix array overflow
authorunc0rr
Sun, 15 Feb 2009 17:48:05 +0000
changeset 1799 b945f4174d00
parent 1798 029fcab94700
child 1800 f1df2eb32a16
Fix array overflow
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Sun Feb 15 17:24:19 2009 +0000
+++ b/hedgewars/uAIMisc.pas	Sun Feb 15 17:48:05 2009 +0000
@@ -27,7 +27,7 @@
                end;
      TTargets = record
                 Count: Longword;
-                ar: array[0..cMaxHHIndex*5] of TTarget;
+                ar: array[0..Pred(cMaxHHs)] of TTarget;
                 end;
      TJumpType = (jmpNone, jmpHJump, jmpLJump);
      TGoInfo = record