mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-24 12:41:09 +03:00
Fix OOB access on CBaseCombatCharacter::m_hMyWeapons
This commit is contained in:
parent
5d50335c02
commit
7ebb26c996
@ -8045,10 +8045,13 @@ int CAI_BaseNPC::UnholsterWeapon( void )
|
|||||||
if (i == -1)
|
if (i == -1)
|
||||||
{
|
{
|
||||||
// Set i to the first weapon you can find
|
// Set i to the first weapon you can find
|
||||||
for (i = 0; i < WeaponCount(); i++)
|
for (i = 0;;)
|
||||||
{
|
{
|
||||||
if (GetWeapon(i))
|
if (GetWeapon(i))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (++i >= WeaponCount())
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user