From 4694b0a8edf0312e78a4f12e1483e432b5140cc8 Mon Sep 17 00:00:00 2001 From: Ben Payne Date: Tue, 20 Jan 2015 17:56:46 -0500 Subject: [PATCH] Fix buffer size larger than necessary --- Engine/source/gfx/gfxDrawUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/gfx/gfxDrawUtil.cpp b/Engine/source/gfx/gfxDrawUtil.cpp index b04791d1c..1e677685e 100644 --- a/Engine/source/gfx/gfxDrawUtil.cpp +++ b/Engine/source/gfx/gfxDrawUtil.cpp @@ -148,7 +148,7 @@ U32 GFXDrawUtil::drawTextN( GFont *font, const Point2I &ptDraw, const UTF8 *in_s // Convert to UTF16 temporarily. n++; // space for null terminator - FrameTemp ubuf( n * sizeof(UTF16) ); + FrameTemp ubuf( n ); convertUTF8toUTF16N(in_string, ubuf, n); return drawTextN( font, ptDraw, ubuf, n, colorTable, maxColorIndex, rot );