mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Fix buffer size larger than necessary
This commit is contained in:
parent
2cc4801974
commit
4694b0a8ed
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ U32 GFXDrawUtil::drawTextN( GFont *font, const Point2I &ptDraw, const UTF8 *in_s
|
||||||
|
|
||||||
// Convert to UTF16 temporarily.
|
// Convert to UTF16 temporarily.
|
||||||
n++; // space for null terminator
|
n++; // space for null terminator
|
||||||
FrameTemp<UTF16> ubuf( n * sizeof(UTF16) );
|
FrameTemp<UTF16> ubuf( n );
|
||||||
convertUTF8toUTF16N(in_string, ubuf, n);
|
convertUTF8toUTF16N(in_string, ubuf, n);
|
||||||
|
|
||||||
return drawTextN( font, ptDraw, ubuf, n, colorTable, maxColorIndex, rot );
|
return drawTextN( font, ptDraw, ubuf, n, colorTable, maxColorIndex, rot );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue