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

@ -2680,11 +2680,12 @@ DefineConsoleMethod( SimObject, getDynamicField, const char*, ( S32 index ),,
++itr;
}
char* buffer = Con::getReturnBuffer(256);
static const U32 bufSize = 256;
char* buffer = Con::getReturnBuffer(bufSize);
if (*itr)
{
SimFieldDictionary::Entry* entry = *itr;
dSprintf(buffer, 256, "%s\t%s", entry->slotName, entry->value);
dSprintf(buffer, bufSize, "%s\t%s", entry->slotName, entry->value);
return buffer;
}