mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 07:23:05 +00:00
Patch #2968610: Zak C64 German: crash due to padding bytes
svn-id: r48981
This commit is contained in:
parent
09a54d765f
commit
b0f17579c9
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user