mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
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:
parent
d0a64026b0
commit
f3fc84738b
42 changed files with 300 additions and 204 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue