aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kernel.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-30 16:14:31 +0000
committerFilippos Karapetis2010-05-30 16:14:31 +0000
commitc32e88fe0bb61e75ca983072ba28102d4efbf123 (patch)
tree1da8c37a9256743e2c62abc8d3a70d84c26e8e55 /engines/sci/engine/kernel.cpp
parent0276ec835ef3c77a4dbf772ea54cc6d5292452f2 (diff)
downloadscummvm-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.cpp2
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;