From e10e60eb807164863458571627805c0c5db76281 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sun, 6 Jan 2013 15:24:04 +1300 Subject: pass the correct output buffer size to lzo1x_compress rather than the input buffer size --- tools/TexturePacker/XBMCTex.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/TexturePacker/XBMCTex.cpp b/tools/TexturePacker/XBMCTex.cpp index 8db78eb873..488e909008 100644 --- a/tools/TexturePacker/XBMCTex.cpp +++ b/tools/TexturePacker/XBMCTex.cpp @@ -196,7 +196,8 @@ CXBTFFrame appendContent(CXBTFWriter &writer, int width, int height, unsigned ch if ((flags & FLAGS_USE_LZO) == FLAGS_USE_LZO) { // grab a temporary buffer for unpacking into - unsigned char *packed = new unsigned char[size + size / 16 + 64 + 3]; // see simple.c in lzo + packedSize = size + size / 16 + 64 + 3; // see simple.c in lzo + unsigned char *packed = new unsigned char[packedSize]; unsigned char *working = new unsigned char[LZO1X_999_MEM_COMPRESS]; if (packed && working) { -- cgit v1.2.3