diff options
author | Gregory Montoir | 2007-12-08 08:48:31 +0000 |
---|---|---|
committer | Gregory Montoir | 2007-12-08 08:48:31 +0000 |
commit | e82c2b3fb95d101ac6e046ead4b516dc8881ec67 (patch) | |
tree | f7872be33e8e583021f22d16918806c72985f057 /engines/cine | |
parent | e905723b1ed12340d4da0239aa17d5eb778bc4af (diff) | |
download | scummvm-rg350-e82c2b3fb95d101ac6e046ead4b516dc8881ec67.tar.gz scummvm-rg350-e82c2b3fb95d101ac6e046ead4b516dc8881ec67.tar.bz2 scummvm-rg350-e82c2b3fb95d101ac6e046ead4b516dc8881ec67.zip |
reverted part of commit #29749, inplace unpacking doesn't work with .ani data
svn-id: r29756
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/part.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index 18c3a8787e..da7d8aa3c7 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -251,8 +251,10 @@ byte *readBundleFile(int16 foundFileIdx) { assert(foundFileIdx >= 0 && foundFileIdx < numElementInPart); byte *dataPtr = (byte *)calloc(partBuffer[foundFileIdx].unpackedSize, 1); if (partBuffer[foundFileIdx].unpackedSize != partBuffer[foundFileIdx].packedSize) { - readFromPart(foundFileIdx, dataPtr); - delphineUnpack(dataPtr, dataPtr, partBuffer[foundFileIdx].packedSize); + byte *unpackBuffer = (byte *)malloc(partBuffer[foundFileIdx].packedSize); + readFromPart(foundFileIdx, unpackBuffer); + delphineUnpack(dataPtr, unpackBuffer, partBuffer[foundFileIdx].packedSize); + free(unpackBuffer); } else { readFromPart(foundFileIdx, dataPtr); } |