diff options
author | Paweł Kołodziejski | 2004-09-18 13:24:02 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-09-18 13:24:02 +0000 |
commit | 9baf06c9faf1ba9707932ebb72578a5fbcafdb63 (patch) | |
tree | 36c97357903fa3dd8b6f493c12a2024bb36d2932 /scumm/imuse_digi | |
parent | 1da55dc2ad0d1df83b08f43601c25f103b3f1af3 (diff) | |
download | scummvm-rg350-9baf06c9faf1ba9707932ebb72578a5fbcafdb63.tar.gz scummvm-rg350-9baf06c9faf1ba9707932ebb72578a5fbcafdb63.tar.bz2 scummvm-rg350-9baf06c9faf1ba9707932ebb72578a5fbcafdb63.zip |
workaround for decode bundle bug (it overloaded memory)
svn-id: r15165
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r-- | scumm/imuse_digi/dimuse_bndmgr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scumm/imuse_digi/dimuse_bndmgr.cpp b/scumm/imuse_digi/dimuse_bndmgr.cpp index ff783670e7..9eedc9a473 100644 --- a/scumm/imuse_digi/dimuse_bndmgr.cpp +++ b/scumm/imuse_digi/dimuse_bndmgr.cpp @@ -253,15 +253,14 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size, output_size -= skip; } + if ((output_size + skip) > 0x2000) // workaround + output_size -= (output_size + skip) - 0x2000; + if (output_size > size) output_size = size; assert(final_size + output_size <= blocks_final_size); - if ((skip + output_size) > 0x2000) { - error("skip: %d, output_size: %d, _outputSize: %d", skip, output_size, _outputSize); - } - memcpy(*comp_final + final_size, _compOutput + skip, output_size); final_size += output_size; |