diff options
author | Filippos Karapetis | 2010-08-18 00:04:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-08-18 00:04:21 +0000 |
commit | 190043e6b7249a2669e07264cced434e5b5acd61 (patch) | |
tree | 80fbe5503c92cf562177bd3fa99c23901a04b660 | |
parent | f23cc57ad5eb461ea7a85cc40ba2de37a721a6c9 (diff) | |
download | scummvm-rg350-190043e6b7249a2669e07264cced434e5b5acd61.tar.gz scummvm-rg350-190043e6b7249a2669e07264cced434e5b5acd61.tar.bz2 scummvm-rg350-190043e6b7249a2669e07264cced434e5b5acd61.zip |
SCI: Resolved a FIXME concerning scripts with more than one export table (it only makes sense for SCI0-SCI1 games)
svn-id: r52179
-rw-r--r-- | engines/sci/engine/script.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index f4129bb1ea..00918aec2e 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -329,13 +329,11 @@ uint16 Script::validateExportFunc(int pubfunct) { uint16 offset = READ_SCI11ENDIAN_UINT16(_exportTable + pubfunct); VERIFY(offset < _bufSize, "invalid export function pointer"); - if (offset == 0) { - // Check if the game has a second export table (e.g. script 912 in Camelot) + if (offset == 0 && getSciVersion() <= SCI_VERSION_1_LATE) { + // Check if the game has a second export table (e.g. script 912 in Camelot). + // This only makes sense for SCI0-SCI1, as the export table in SCI1.1+ games + // is located at a specific address, thus findBlock() won't work. // Fixes bug #3039785 - if (g_sci->getGameId() != GID_CAMELOT) // cheap fix - return offset; - // we are getting assert()s in eco quest 1 (right on startup) and kq6 and maybe more - // [md5] plz look into this TODO FIXME const uint16 *secondExportTable = (const uint16 *)findBlock(SCI_OBJ_EXPORTS, 0); if (secondExportTable) { |