changeset 9664 | 1e528c58e41d |
parent 9579 | 1f20cc6a642a |
child 9670 | 1954f692e8c6 |
--- a/hedgewars/uGearsHedgehog.pas Thu Oct 31 20:50:20 2013 -0400 +++ b/hedgewars/uGearsHedgehog.pas Thu Oct 31 21:04:39 2013 -0400 @@ -114,9 +114,9 @@ LoadHedgehogHat(HHGear^.Hedgehog^, Hat); end; // Try again in the next slot - if CurAmmoType = prevAmmo then + if (CurAmmoType = prevAmmo) and (slot < cMaxSlotIndex) then begin - if slot < cMaxSlotIndex then inc(slot); + inc(slot); HHGear^.MsgParam:= slot; ChangeAmmo(HHGear) end