hedgewars/uAmmos.pas
changeset 12671 87b3009f51c3
parent 12649 2837dee472cc
child 12691 286afe079117
--- a/hedgewars/uAmmos.pas	Sun Oct 08 04:14:49 2017 +0200
+++ b/hedgewars/uAmmos.pas	Sun Oct 08 04:57:28 2017 +0200
@@ -212,7 +212,7 @@
     cnt:= 0;
 if (cnt <> AMMO_INFINITE) then
     begin
-    inc(cnt, amt);
+    cnt:= min(AMMO_FINITE_MAX, cnt + amt);
     SetAmmo(Hedgehog, ammo, cnt)
     end
 end;