diff options
author | Robert Göffringmann | 2003-12-17 11:39:19 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-12-17 11:39:19 +0000 |
commit | 215c8e3fc60b96bc6455c9543004592bc452f43e (patch) | |
tree | 92d7d7516b8830c9491a83daf7e5ab8cf77fa5c4 /sword1 | |
parent | eeb15c04330e84c5280f3edef38c8f2743050a95 (diff) | |
download | scummvm-rg350-215c8e3fc60b96bc6455c9543004592bc452f43e.tar.gz scummvm-rg350-215c8e3fc60b96bc6455c9543004592bc452f43e.tar.bz2 scummvm-rg350-215c8e3fc60b96bc6455c9543004592bc452f43e.zip |
big endian fix
svn-id: r11710
Diffstat (limited to 'sword1')
-rw-r--r-- | sword1/sound.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sword1/sound.cpp b/sword1/sound.cpp index d1f9dabb72..6b6442d106 100644 --- a/sword1/sound.cpp +++ b/sword1/sound.cpp @@ -197,13 +197,13 @@ uint32 SwordSound::expandSpeech(void *src, void *dest, uint32 srcSize) { uint32 srcPos = 0; while (srcPos < srcSize) { - if (compData[srcPos] < 0) { - uint16 len = (uint16)(-compData[srcPos]); + if ((int16)FROM_LE_16(compData[srcPos]) < 0) { + uint16 len = (uint16)(-(int16)FROM_LE_16(compData[srcPos])); for (uint32 cnt = 0; cnt < len; cnt++) *expData++ = compData[srcPos + 1]; srcPos += 2; } else { - uint32 len = (uint32)compData[srcPos]; + uint32 len = FROM_LE_16(compData[srcPos]); memcpy(expData, compData + srcPos + 1, len * 2); expData += len; srcPos += len + 1; |