Prevent using SetAmmo to set amNothing to anything.
authornemo
Thu, 31 Oct 2013 10:46:52 -0400
changeset 9660 267c0005baaf
parent 9659 e9c00dd31b07
child 9661 788fd9eedfb0
Prevent using SetAmmo to set amNothing to anything.
hedgewars/uAmmos.pas
--- a/hedgewars/uAmmos.pas	Wed Oct 30 15:54:29 2013 -0400
+++ b/hedgewars/uAmmos.pas	Thu Oct 31 10:46:52 2013 -0400
@@ -224,6 +224,7 @@
     CurWeapon: PAmmo;
     a: TAmmoType;
 begin
+if ammo = amNothing then exit;
 {$HINTS OFF}
 FillChar(ammos, sizeof(ammos), 0);
 {$HINTS ON}