aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorGregory Montoir2007-12-08 08:48:31 +0000
committerGregory Montoir2007-12-08 08:48:31 +0000
commite82c2b3fb95d101ac6e046ead4b516dc8881ec67 (patch)
treef7872be33e8e583021f22d16918806c72985f057 /engines/cine
parente905723b1ed12340d4da0239aa17d5eb778bc4af (diff)
downloadscummvm-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.cpp6
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);
}