diff --git a/src/p_acs.cpp b/src/p_acs.cpp index b8976955b5..466d8793e1 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4546,7 +4546,7 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType * // unwrap contained type type = arraytype->ElementType; // offset by index (if in bounds) - if ((unsigned)index < arraytype->ElementCount) + if ((unsigned)index >= arraytype->ElementCount) { // out of bounds return false; }