diff options
author | Scott Thomas | 2009-10-01 15:58:15 +0000 |
---|---|---|
committer | Scott Thomas | 2009-10-01 15:58:15 +0000 |
commit | 2fa7fbc1a53b7f158dfe9c70395d1b8a2cd442d1 (patch) | |
tree | 3684d941e7e30282d65465e38baa1c8fd8297943 /engines | |
parent | 6697f469224a00bda5d6f6e383d71ad4a6faedbb (diff) | |
download | scummvm-rg350-2fa7fbc1a53b7f158dfe9c70395d1b8a2cd442d1.tar.gz scummvm-rg350-2fa7fbc1a53b7f158dfe9c70395d1b8a2cd442d1.tar.bz2 scummvm-rg350-2fa7fbc1a53b7f158dfe9c70395d1b8a2cd442d1.zip |
T7G: Proper fix for #2847539 - remove ambiguity in multi-byte script reads.
svn-id: r44524
Diffstat (limited to 'engines')
-rw-r--r-- | engines/groovie/script.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 6b2a0c3176..3c6734fc39 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -264,11 +264,15 @@ uint8 Script::readScriptVar() { } uint16 Script::readScript16bits() { - return readScript8bits() | (readScript8bits() << 8); + uint8 lower = readScript8bits(); + uint8 upper = readScript8bits(); + return lower | (upper << 8); } uint32 Script::readScript32bits() { - return readScript16bits() | (readScript16bits() << 16); + uint16 lower = readScript16bits(); + uint16 upper = readScript16bits(); + return lower | (upper << 16); } uint16 Script::readScript8or16bits() { |