aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMax Horn2009-09-06 12:56:28 +0000
committerMax Horn2009-09-06 12:56:28 +0000
commitcd7a32eed00d503da9c06a7915503ce8c99c075a (patch)
treea3961747deb5e815200363a4f4dd19c217bd24f1 /engines/sci/engine
parenteda081173b93f2ce5bff48d58e926253808e94ab (diff)
downloadscummvm-rg350-cd7a32eed00d503da9c06a7915503ce8c99c075a.tar.gz
scummvm-rg350-cd7a32eed00d503da9c06a7915503ce8c99c075a.tar.bz2
scummvm-rg350-cd7a32eed00d503da9c06a7915503ce8c99c075a.zip
SCI: Change script_lookup_export to use SegManager::validateExportFunc
svn-id: r43978
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/vm.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index e331ec8b91..0e9890473f 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1507,8 +1507,7 @@ SelectorType lookup_selector(SegManager *segManager, reg_t obj_location, Selecto
reg_t script_lookup_export(SegManager *segManager, int script_nr, int export_index) {
SegmentId seg = segManager->getSegment(script_nr, SCRIPT_GET_DONT_LOAD);
- Script *script = segManager->getScriptIfLoaded(seg);
- return make_reg(seg, READ_LE_UINT16((byte *)(script->export_table + export_index)));
+ return make_reg(seg, segManager->validateExportFunc(export_index, seg));
}
#define INST_LOOKUP_CLASS(id) ((id == 0xffff)? NULL_REG : segManager->get_class_address(id, SCRIPT_GET_LOCK, reg))