From cd7a32eed00d503da9c06a7915503ce8c99c075a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 6 Sep 2009 12:56:28 +0000 Subject: SCI: Change script_lookup_export to use SegManager::validateExportFunc svn-id: r43978 --- engines/sci/engine/vm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/sci/engine') 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)) -- cgit v1.2.3