1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 11:35:54 +00:00

fix UB and potential crashes when doing ice cream

This commit is contained in:
withmorten 2021-02-02 11:27:30 +01:00
parent 1eb77c4d6d
commit 4281730b16

View file

@ -113,7 +113,11 @@ const C2dEffect* CPedAttractorManager::GetEffectForIceCreamVan(CVehicle* pVehicl
CVehicleToEffect effect(pVehicle); CVehicleToEffect effect(pVehicle);
vVehicleToEffect.push_back(effect); vVehicleToEffect.push_back(effect);
POP_MEMID(); POP_MEMID();
#ifdef FIX_BUGS
return vVehicleToEffect.back().ChooseEffect(pos);
#else
return effect.ChooseEffect(pos); return effect.ChooseEffect(pos);
#endif
} }
CVehicle* CPedAttractorManager::GetIceCreamVanForEffect(C2dEffect* pEffect) CVehicle* CPedAttractorManager::GetIceCreamVanForEffect(C2dEffect* pEffect)