mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
Add guard to prevent OOB error
This commit is contained in:
parent
1719b70559
commit
9cc8dee5fe
1 changed files with 6 additions and 3 deletions
|
@ -3495,9 +3495,12 @@ default_case:
|
|||
SA(spriteNum) = (sprite[dmgSrc].ang + 1024) & 2047;
|
||||
sprite[spriteNum].xvel = -(sprite[dmgSrc].extra << 2);
|
||||
int16_t sectNum = SECT(spriteNum);
|
||||
pushmove((vec3_t *)&sprite[spriteNum], §Num, 128L, (4L << 8), (4L << 8), CLIPMASK0);
|
||||
if (sectNum != SECT(spriteNum) && (unsigned)sectNum < MAXSECTORS)
|
||||
changespritesect(spriteNum, sectNum);
|
||||
if ((unsigned)sectNum < MAXSECTORS)
|
||||
{
|
||||
pushmove((vec3_t *)&sprite[spriteNum], §Num, 128L, (4L << 8), (4L << 8), CLIPMASK0);
|
||||
if (sectNum != SECT(spriteNum) && (unsigned)sectNum < MAXSECTORS)
|
||||
changespritesect(spriteNum, sectNum);
|
||||
}
|
||||
}
|
||||
|
||||
if (sprite[spriteNum].statnum == STAT_ZOMBIEACTOR)
|
||||
|
|
Loading…
Reference in a new issue