fixed another potential crash bug
This commit is contained in:
parent
95a02680ca
commit
6b4a7f9ffd
1 changed files with 1 additions and 1 deletions
|
|
@ -5213,7 +5213,7 @@ bool Bot::HasHostage (void)
|
|||
|
||||
int Bot::GetAmmo (void)
|
||||
{
|
||||
if (g_weaponDefs[m_currentWeapon].ammo1 == -1)
|
||||
if (g_weaponDefs[m_currentWeapon].ammo1 == -1 || g_weaponDefs[m_currentWeapon].ammo1 > 31)
|
||||
return 0;
|
||||
|
||||
return m_ammo[g_weaponDefs[m_currentWeapon].ammo1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue