diff options
author | Travis Howell | 2006-03-03 07:40:34 +0000 |
---|---|---|
committer | Travis Howell | 2006-03-03 07:40:34 +0000 |
commit | 0b30043f93c6822e2077e03caab4d13c789d9eda (patch) | |
tree | 3ddbc1ea2e0081ce65f394df05cf7d6b3195cb1c /engines/scumm | |
parent | 09543f873e08cef03755add1910d30e1c12f7370 (diff) | |
download | scummvm-rg350-0b30043f93c6822e2077e03caab4d13c789d9eda.tar.gz scummvm-rg350-0b30043f93c6822e2077e03caab4d13c789d9eda.tar.bz2 scummvm-rg350-0b30043f93c6822e2077e03caab4d13c789d9eda.zip |
Read array bounds in checkArrayLimits() correctly on all systems
svn-id: r21024
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 0ca304f04a..680c3d078a 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -2041,7 +2041,7 @@ void ScummEngine_v72he::checkArrayLimits(int array, int dim2start, int dim2end, } ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array)); assert(ah); - if (ah->dim2start > dim2start || ah->dim2end < dim2end || ah->dim1start > dim1start || ah->dim1end < dim1end) { + if ((int)FROM_LE_32(ah->dim2start) > dim2start || (int)FROM_LE_32(ah->dim2end) < dim2end || (int)FROM_LE_32(ah->dim1start) > dim1start || (int)FROM_LE_32(ah->dim1end) < dim1end) { error("Invalid array access (%d,%d,%d,%d) limit (%d,%d,%d,%d)", dim2start, dim2end, dim1start, dim1end, ah->dim2start, ah->dim2end, ah->dim1start, ah->dim1end); } } |