aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/TexturePacker/XBMCTex.cpp3
1 files changed, 2 insertions, 1 deletions
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)
{