From 215c8e3fc60b96bc6455c9543004592bc452f43e Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Wed, 17 Dec 2003 11:39:19 +0000 Subject: big endian fix svn-id: r11710 --- sword1/sound.cpp | 6 +++--- 1 file 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; -- cgit v1.2.3