diff options
author | Martin Kiewitz | 2016-07-01 15:23:50 +0200 |
---|---|---|
committer | Martin Kiewitz | 2016-07-01 15:23:50 +0200 |
commit | 17b3dc4584ab2f01d3109c13cf202db6d9532c5e (patch) | |
tree | b3aae9ddd3bdf0b30e45387e6b6b91e8539b50ee /engines/sci/engine | |
parent | 9cf3566e279c1ca2c78edb6123c57f27a2fb3610 (diff) | |
download | scummvm-rg350-17b3dc4584ab2f01d3109c13cf202db6d9532c5e.tar.gz scummvm-rg350-17b3dc4584ab2f01d3109c13cf202db6d9532c5e.tar.bz2 scummvm-rg350-17b3dc4584ab2f01d3109c13cf202db6d9532c5e.zip |
SCI: Fix script patcher, so that it works on BE systems
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 1302cc94ea..13c3297f90 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -4138,7 +4138,7 @@ int32 ScriptPatcher::findSignature(const SciScriptPatcherEntry *patchEntry, cons return findSignature(runtimeEntry->magicDWord, runtimeEntry->magicOffset, patchEntry->signatureData, patchEntry->description, scriptData, scriptSize); } -// Attention: Magic DWord is returns using platform specific byte order. This is done on purpose for performance. +// Attention: Magic DWord is returned using platform specific byte order. This is done on purpose for performance. void ScriptPatcher::calculateMagicDWordAndVerify(const char *signatureDescription, const uint16 *signatureData, bool magicDWordIncluded, uint32 &calculatedMagicDWord, int &calculatedMagicDWordOffset) { Selector curSelector = -1; int magicOffset; @@ -4219,7 +4219,7 @@ void ScriptPatcher::calculateMagicDWordAndVerify(const char *signatureDescriptio } if (!magicDWordLeft) { // Magic DWORD is now known, convert to platform specific byte order - calculatedMagicDWord = READ_LE_UINT32(magicDWord); + calculatedMagicDWord = READ_UINT32(magicDWord); } } break; @@ -4244,7 +4244,8 @@ void ScriptPatcher::calculateMagicDWordAndVerify(const char *signatureDescriptio magicDWord[4 - magicDWordLeft] = (byte)curValue; magicDWordLeft--; if (!magicDWordLeft) { - calculatedMagicDWord = READ_LE_UINT32(magicDWord); + // Magic DWORD is now known, convert to platform specific byte order + calculatedMagicDWord = READ_UINT32(magicDWord); } } break; |