aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sword2/driver/d_sound.cpp')
-rw-r--r--sword2/driver/d_sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index c97a8b9690..99c0a31bec 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -388,14 +388,14 @@ int32 Sword2Sound::GetCompSpeechSize(const char *filename, uint32 speechid) {
return (0);
}
- if (!speechIndex[0] || !speechIndex[1]) {
+ if (!FROM_LE_32(speechIndex[0]) || !FROM_LE_32(speechIndex[1])) {
fp.close();
return (0);
}
fp.close();
- i = (speechIndex[1] - 1) * 2 + sizeof(_wavHeader) + 8;
+ i = (FROM_LE_32(speechIndex[1]) - 1) * 2 + sizeof(_wavHeader) + 8;
return(i);
}