mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +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,10 +3495,13 @@ default_case:
|
||||||
SA(spriteNum) = (sprite[dmgSrc].ang + 1024) & 2047;
|
SA(spriteNum) = (sprite[dmgSrc].ang + 1024) & 2047;
|
||||||
sprite[spriteNum].xvel = -(sprite[dmgSrc].extra << 2);
|
sprite[spriteNum].xvel = -(sprite[dmgSrc].extra << 2);
|
||||||
int16_t sectNum = SECT(spriteNum);
|
int16_t sectNum = SECT(spriteNum);
|
||||||
|
if ((unsigned)sectNum < MAXSECTORS)
|
||||||
|
{
|
||||||
pushmove((vec3_t *)&sprite[spriteNum], §Num, 128L, (4L << 8), (4L << 8), CLIPMASK0);
|
pushmove((vec3_t *)&sprite[spriteNum], §Num, 128L, (4L << 8), (4L << 8), CLIPMASK0);
|
||||||
if (sectNum != SECT(spriteNum) && (unsigned)sectNum < MAXSECTORS)
|
if (sectNum != SECT(spriteNum) && (unsigned)sectNum < MAXSECTORS)
|
||||||
changespritesect(spriteNum, sectNum);
|
changespritesect(spriteNum, sectNum);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sprite[spriteNum].statnum == STAT_ZOMBIEACTOR)
|
if (sprite[spriteNum].statnum == STAT_ZOMBIEACTOR)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue