Merge pull request #287 from edward-san/acs_overflow_fix

- Fixed imprecise bound checking in ACS code.
This commit is contained in:
rheit 2015-03-04 13:57:37 -06:00
commit 464931a865

View file

@ -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;
} }