We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e121f commit d691b66Copy full SHA for d691b66
MTA10/mods/shared_logic/lua/CLuaFunctionDefs.Ped.cpp
@@ -233,7 +233,7 @@ int CLuaFunctionDefs::GetPedTotalAmmo ( lua_State* luaVM )
233
lua_pushnumber ( luaVM, usAmmo );
234
return 1;
235
}
236
- else if ( pPed->m_usWeaponAmmo [ ucSlot ] )
+ else if ( ucSlot < WEAPONSLOT_MAX && pPed->m_usWeaponAmmo [ ucSlot ] )
237
{
238
// The ped musn't be streamed in, so we can get the stored value instead
239
ushort usAmmo = 1;
0 commit comments