Fix off-by-1 error leading to crash
authorunC0Rr
Fri, 16 Jun 2023 21:06:46 +0200
changeset 15989 723be7e392e5
parent 15988 24545642473f
child 15990 79b1129b4d03
Fix off-by-1 error leading to crash
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Fri Jun 16 08:10:45 2023 +0200
+++ b/hedgewars/uAIMisc.pas	Fri Jun 16 21:06:46 2023 +0200
@@ -148,7 +148,7 @@
             (Gear^.Health = 0) and
              (Gear^.Damage < 35))
              )  and
-        (Targets.Count < 256) then
+        (Targets.Count < 255) then
         begin
         with Targets.ar[Targets.Count] do
             begin