mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Merge pull request #287 from edward-san/acs_overflow_fix
- Fixed imprecise bound checking in ACS code.
This commit is contained in:
commit
464931a865
1 changed files with 2 additions and 2 deletions
|
@ -8790,7 +8790,7 @@ scriptwait:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_PLAYERINGAME:
|
case PCD_PLAYERINGAME:
|
||||||
if (STACK(1) < 0 || STACK(1) > MAXPLAYERS)
|
if (STACK(1) < 0 || STACK(1) >= MAXPLAYERS)
|
||||||
{
|
{
|
||||||
STACK(1) = false;
|
STACK(1) = false;
|
||||||
}
|
}
|
||||||
|
@ -8801,7 +8801,7 @@ scriptwait:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_PLAYERISBOT:
|
case PCD_PLAYERISBOT:
|
||||||
if (STACK(1) < 0 || STACK(1) > MAXPLAYERS || !playeringame[STACK(1)])
|
if (STACK(1) < 0 || STACK(1) >= MAXPLAYERS || !playeringame[STACK(1)])
|
||||||
{
|
{
|
||||||
STACK(1) = false;
|
STACK(1) = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue