mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 23:33:00 +00:00
Fixed: GetVarAddrType() bounds check was inverted
This commit is contained in:
parent
13a7507c4d
commit
72edd7d455
1 changed files with 1 additions and 1 deletions
|
@ -4546,7 +4546,7 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType *
|
||||||
// unwrap contained type
|
// unwrap contained type
|
||||||
type = arraytype->ElementType;
|
type = arraytype->ElementType;
|
||||||
// offset by index (if in bounds)
|
// offset by index (if in bounds)
|
||||||
if ((unsigned)index < arraytype->ElementCount)
|
if ((unsigned)index >= arraytype->ElementCount)
|
||||||
{ // out of bounds
|
{ // out of bounds
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue