diff options
author | Travis Howell | 2003-09-10 03:50:03 +0000 |
---|---|---|
committer | Travis Howell | 2003-09-10 03:50:03 +0000 |
commit | 87ff23ddc15b15d8b5d1f37ab7900b468bb42cf5 (patch) | |
tree | 1871a9266cd0877ca88da501268d4a0fbe251b81 | |
parent | 94c4cf0e55a2286cba82c5d1317ab85503f5124d (diff) | |
download | scummvm-rg350-87ff23ddc15b15d8b5d1f37ab7900b468bb42cf5.tar.gz scummvm-rg350-87ff23ddc15b15d8b5d1f37ab7900b468bb42cf5.tar.bz2 scummvm-rg350-87ff23ddc15b15d8b5d1f37ab7900b468bb42cf5.zip |
Correct RO sound resource size for blocked games.
svn-id: r10146
-rw-r--r-- | scumm/resource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index b823f86b84..2115408987 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -1573,7 +1573,7 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) { ro_size = _fileHandle.readUint16LE(); src_ptr = (byte *) calloc(ro_size - 4, 1); - _fileHandle.seek(ro_offs +4, SEEK_SET); + _fileHandle.seek(ro_offs + 4, SEEK_SET); _fileHandle.read(src_ptr, ro_size -4); ptr = createResource(type, idx, ro_size + 2); @@ -1599,8 +1599,8 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) { (char) ((tag >> 8) & 0xff), size); if (tag == 0x4F52) { // RO - ro_size = size; ro_offs = _fileHandle.pos(); + ro_size = size; } else { pos = 6; while (pos < total_size) { @@ -1667,7 +1667,7 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) { return 1; } else if (ro_offs != 0) { _fileHandle.seek(ro_offs - 2, SEEK_SET); - _fileHandle.read(createResource(type, idx, ro_size + 2), ro_size + 2); + _fileHandle.read(createResource(type, idx, ro_size - 4), ro_size - 4); return 1; } res.roomoffs[type][idx] = 0xFFFFFFFF; |