diff options
author | Martin Kiewitz | 2016-02-12 20:30:43 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-02-12 20:30:43 +0100 |
commit | eaf6e5d4f8848f87835b368dd9f8f31cb14a705c (patch) | |
tree | 4ca2f8003f7a721e252957cb5bd53f868f5d6e02 /engines/sci | |
parent | 655f4dfedbb2b3ca8600777eb1011bb1df0ecf79 (diff) | |
download | scummvm-rg350-eaf6e5d4f8848f87835b368dd9f8f31cb14a705c.tar.gz scummvm-rg350-eaf6e5d4f8848f87835b368dd9f8f31cb14a705c.tar.bz2 scummvm-rg350-eaf6e5d4f8848f87835b368dd9f8f31cb14a705c.zip |
SCI: Fix fallback detector crashing on BE regress.
Regression from af3fec8c26d92005b507dca65d1d50f820feb0e7
Code resulted in a crash on BE platforms
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/resource.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 54ef4b3363..f35781231b 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -2679,7 +2679,9 @@ Common::String ResourceManager::findSierraGameId() { return ""; // Seek to the name selector of the first export - byte *seeker = heap->data + READ_UINT16(heap->data + gameObjectOffset + nameSelector * 2); + byte *offsetPtr = heap->data + gameObjectOffset + nameSelector * 2; + uint16 offset = !isSci11Mac() ? READ_LE_UINT16(offsetPtr) : READ_BE_UINT16(offsetPtr); + byte *seeker = heap->data + offset; Common::String sierraId; sierraId += (const char *)seeker; |