mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
CON_UPDATESECTOR/CON_UPDATESECTORZ: only use sprite[vm.spriteNum].sectnum if the initial value of the input/output parameter is outside the range of 0 - MAXSECTORS-1
git-svn-id: https://svn.eduke32.com/eduke32@7579 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a32597464f
commit
e5c979c997
1 changed files with 8 additions and 2 deletions
|
@ -4913,7 +4913,10 @@ badindex:
|
|||
Gv_FillWithVars(vect);
|
||||
|
||||
int const returnVar = *insptr++;
|
||||
int16_t sectNum = sprite[vm.spriteNum].sectnum;
|
||||
int16_t sectNum = Gv_GetVarX(returnVar);
|
||||
|
||||
if ((unsigned)sectNum >= MAXSECTORS)
|
||||
sectNum = sprite[vm.spriteNum].sectnum;
|
||||
|
||||
updatesector(vect.x, vect.y, §Num);
|
||||
Gv_SetVarX(returnVar, sectNum);
|
||||
|
@ -4927,7 +4930,10 @@ badindex:
|
|||
Gv_FillWithVars(vect);
|
||||
|
||||
int const returnVar = *insptr++;
|
||||
int16_t sectNum = sprite[vm.spriteNum].sectnum;
|
||||
int16_t sectNum = Gv_GetVarX(returnVar);
|
||||
|
||||
if ((unsigned)sectNum >= MAXSECTORS)
|
||||
sectNum = sprite[vm.spriteNum].sectnum;
|
||||
|
||||
updatesectorz(vect.x, vect.y, vect.z, §Num);
|
||||
Gv_SetVarX(returnVar, sectNum);
|
||||
|
|
Loading…
Reference in a new issue