mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-28 06:43:01 +05:00
VC: Fix a stack corruption in ZeroAmmoFix
This commit is contained in:
parent
ac3601e12c
commit
f72f85ecd6
1 changed files with 3 additions and 3 deletions
|
@ -260,12 +260,12 @@ namespace ZeroAmmoFix
|
|||
{
|
||||
|
||||
template<std::size_t Index>
|
||||
static void (__fastcall *orgGiveWeapon)(void* ped, void*, unsigned int weapon, unsigned int ammo);
|
||||
static void (__fastcall *orgGiveWeapon)(void* ped, void*, unsigned int weapon, unsigned int ammo, bool flag);
|
||||
|
||||
template<std::size_t Index>
|
||||
static void __fastcall GiveWeapon_SP(void* ped, void*, unsigned int weapon, unsigned int ammo)
|
||||
static void __fastcall GiveWeapon_SP(void* ped, void*, unsigned int weapon, unsigned int ammo, bool flag)
|
||||
{
|
||||
orgGiveWeapon<Index>(ped, nullptr, weapon, std::max(1u, ammo));
|
||||
orgGiveWeapon<Index>(ped, nullptr, weapon, std::max(1u, ammo), flag);
|
||||
}
|
||||
HOOK_EACH_FUNC(GiveWeapon, orgGiveWeapon, GiveWeapon_SP);
|
||||
|
||||
|
|
Loading…
Reference in a new issue