aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/file.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index 6b68b5d804..0081720d03 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -431,8 +431,12 @@ uint16 ScummDiskImage::extractResource(Common::WriteStream *out, int res) {
}
for (i = 0; i < _resourcesPerFile[res]; i++) {
- uint16 len = fileReadUint16LE();
- reslen += write_word(out, len);
+ uint16 len;
+ do {
+ // Note: len might be 0xFFFF for padding in zak-c64-german
+ len = fileReadUint16LE();
+ reslen += write_word(out, len);
+ } while (len == 0xFFFF);
for (len -= 2; len > 0; len--)
reslen += write_byte(out, fileReadByte());