1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-14 07:23:22 +00:00
This commit is contained in:
aap 2020-12-31 16:14:51 +01:00
parent 80d15d142d
commit d89d3db126

View file

@ -121,7 +121,12 @@ CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionT
#endif
int n = 0;
#ifdef FIX_BUGS
while (n < ARRAY_SIZE(gaExplosion) && gaExplosion[n].m_nIteration != 0)
#else
// array overrun is UB
while (gaExplosion[n].m_nIteration != 0 && n < ARRAY_SIZE(gaExplosion))
#endif
n++;
if (n == ARRAY_SIZE(gaExplosion))
return false;