From e82c2b3fb95d101ac6e046ead4b516dc8881ec67 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sat, 8 Dec 2007 08:48:31 +0000 Subject: reverted part of commit #29749, inplace unpacking doesn't work with .ani data svn-id: r29756 --- engines/cine/part.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/cine') 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); } -- cgit v1.2.3