mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
engine.c: prevent an oob read of spriteext[] in drawsprite_classic().
git-svn-id: https://svn.eduke32.com/eduke32@4872 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
61f7c9e30f
commit
5f263f1358
1 changed files with 12 additions and 11 deletions
|
@ -5643,24 +5643,25 @@ static void drawsprite_classic(int32_t snum)
|
|||
int32_t vtilenum = 0;
|
||||
|
||||
spritetype *const tspr = tspriteptr[snum];
|
||||
|
||||
const int32_t xb = spritesxyz[snum].x;
|
||||
const int32_t yp = spritesxyz[snum].y;
|
||||
const int32_t spritenum = tspr->owner;
|
||||
const int32_t sectnum = tspr->sectnum;
|
||||
const sectortype *const sec = (sectnum>=0) ? §or[sectnum] : NULL;
|
||||
int32_t tilenum;
|
||||
int32_t cstat = tspr->cstat;
|
||||
|
||||
uint8_t blendidx = tspr->blend;
|
||||
float alpha = spriteext[spritenum].alpha;
|
||||
|
||||
if (sec == NULL)
|
||||
if (sectnum < 0)
|
||||
return;
|
||||
|
||||
if (bad_tspr(tspr))
|
||||
return;
|
||||
|
||||
uint8_t blendidx = tspr->blend;
|
||||
const int32_t xb = spritesxyz[snum].x;
|
||||
const int32_t yp = spritesxyz[snum].y;
|
||||
|
||||
const int32_t spritenum = tspr->owner;
|
||||
const float alpha = spriteext[spritenum].alpha;
|
||||
|
||||
const sectortype *const sec = §or[sectnum];
|
||||
|
||||
int32_t cstat=tspr->cstat, tilenum;
|
||||
|
||||
DO_TILE_ANIM(tspr->picnum, spritenum+32768);
|
||||
|
||||
if (alpha > 0.0f)
|
||||
|
|
Loading…
Reference in a new issue