Use fixed buffer size var when allocating return buffer from console.

Conflicts:
	Engine/source/T3D/missionArea.cpp
	Engine/source/gui/editor/guiDebugger.cpp
This commit is contained in:
bank 2014-05-15 11:12:43 +04:00
parent d0a64026b0
commit f3fc84738b
42 changed files with 300 additions and 204 deletions

View file

@ -579,8 +579,9 @@ ConsoleMethod( GuiPopUpMenuCtrlEx, getColorById, const char*, 3, 3,
ColorI color;
object->getColoredBox(color, dAtoi(argv[2]));
char *strBuffer = Con::getReturnBuffer(512);
dSprintf(strBuffer, 512, "%d %d %d %d", color.red, color.green, color.blue, color.alpha);
static const U32 bufSize = 512;
char *strBuffer = Con::getReturnBuffer(bufSize);
dSprintf(strBuffer, bufSize, "%d %d %d %d", color.red, color.green, color.blue, color.alpha);
return strBuffer;
}