Fix off-by-1 error leading to crash
authorunC0Rr
Fri, 16 Jun 2023 21:06:46 +0200
changeset 15959 723be7e392e5
parent 15958 24545642473f
child 15960 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