diff options
author | Filippos Karapetis | 2010-05-30 23:31:33 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-30 23:31:33 +0000 |
commit | 50cd1d1da4a934cfcdcf7cb0b05bed6f7d9735c2 (patch) | |
tree | 1db296cc9949220a807398ae340c90189e832c11 /engines/sci/engine/kscripts.cpp | |
parent | 4e25867a671a8847b167decba1ed1e95cf699e66 (diff) | |
download | scummvm-rg350-50cd1d1da4a934cfcdcf7cb0b05bed6f7d9735c2.tar.gz scummvm-rg350-50cd1d1da4a934cfcdcf7cb0b05bed6f7d9735c2.tar.bz2 scummvm-rg350-50cd1d1da4a934cfcdcf7cb0b05bed6f7d9735c2.zip |
Limited access to the script export table and synonyms block
svn-id: r49338
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index b829887433..2f260bc03a 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -181,7 +181,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) { // Returns script dispatch address index in the supplied script reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { int script = argv[0].toUint16(); - int index = (argc > 1) ? argv[1].toUint16() : 0; + uint16 index = (argc > 1) ? argv[1].toUint16() : 0; if (argv[0].segment) return argv[0]; @@ -193,7 +193,7 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { Script *scr = s->_segMan->getScript(scriptSeg); - if (!scr->_numExports) { + if (!scr->getExportsNr()) { // This is normal. Some scripts don't have a dispatch (exports) table, // and this call is probably used to load them in memory, ignoring // the return value. If only one argument is passed, this call is done @@ -205,8 +205,8 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } - if (index > scr->_numExports) { - error("Dispatch index too big: %d > %d", index, scr->_numExports); + if (index > scr->getExportsNr()) { + error("Dispatch index too big: %d > %d", index, scr->getExportsNr()); return NULL_REG; } |