diff options
-rw-r--r-- | engines/toon/anim.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index c5769f5081..53980e3dc1 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -95,7 +95,11 @@ bool Animation::loadAnimation(Common::String file) { } else { _frames[e]._ref = -1; _frames[e]._data = new uint8[decompressedSize]; - decompressLZSS(imageData, _frames[e]._data, decompressedSize); + if (compressedSize < decompressedSize) { + decompressLZSS(imageData, _frames[e]._data, decompressedSize); + } else { + memcpy(_frames[e]._data, imageData, compressedSize); + } } data += headerSize + compressedSize; |