aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstrangerke2011-04-24 23:22:39 +0200
committerstrangerke2011-04-24 23:22:39 +0200
commit3de8b25003ad5aafdcb7ae091383339e6313ce8e (patch)
tree6a09b806e01eb427d7b83b7fc490352cc92e449e
parent62e823300993fe1932173f8800b4088a20b75924 (diff)
downloadscummvm-rg350-3de8b25003ad5aafdcb7ae091383339e6313ce8e.tar.gz
scummvm-rg350-3de8b25003ad5aafdcb7ae091383339e6313ce8e.tar.bz2
scummvm-rg350-3de8b25003ad5aafdcb7ae091383339e6313ce8e.zip
HUGO: Fix BE issue in getSound(). Thanks wjp for finding that issue.
-rw-r--r--engines/hugo/file.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index dcbc1569eb..3a79ba1e7d 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -298,7 +298,11 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) {
}
if (!has_read_header) {
- if (fp.read(s_hdr, sizeof(s_hdr)) != sizeof(s_hdr))
+ for (int i = 0; i < kMaxSounds; i++) {
+ s_hdr[i].size = fp.readUint16LE();
+ s_hdr[i].offset = fp.readUint32LE();
+ }
+ if (fp.err())
error("Wrong sound file format");
has_read_header = true;
}