aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo')
-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;
}