diff options
author | Filippos Karapetis | 2010-05-30 16:14:31 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-30 16:14:31 +0000 |
commit | c32e88fe0bb61e75ca983072ba28102d4efbf123 (patch) | |
tree | 1da8c37a9256743e2c62abc8d3a70d84c26e8e55 /engines/sci/engine/kernel.cpp | |
parent | 0276ec835ef3c77a4dbf772ea54cc6d5292452f2 (diff) | |
download | scummvm-rg350-c32e88fe0bb61e75ca983072ba28102d4efbf123.tar.gz scummvm-rg350-c32e88fe0bb61e75ca983072ba28102d4efbf123.tar.bz2 scummvm-rg350-c32e88fe0bb61e75ca983072ba28102d4efbf123.zip |
Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
svn-id: r49327
Diffstat (limited to 'engines/sci/engine/kernel.cpp')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index ae3d30e81d..0b7198d1bc 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -628,7 +628,7 @@ int Kernel::findRegType(reg_t reg) { switch (mobj->getType()) { case SEG_TYPE_SCRIPT: - if (reg.offset <= (*(Script *)mobj)._bufSize && + if (reg.offset <= (*(Script *)mobj).getBufSize() && reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT((*(Script *)mobj)._buf + reg.offset)) { return ((Script *)mobj)->getObject(reg.offset) ? KSIG_OBJECT : KSIG_REF; |