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

@ -344,8 +344,9 @@ ConsoleFunction(expandFilename, const char*, 2, 2, "(string filename)"
"@ingroup FileSystem")
{
TORQUE_UNUSED(argc);
char* ret = Con::getReturnBuffer( 1024 );
Con::expandScriptFilename(ret, 1024, argv[1]);
static const U32 bufSize = 1024;
char* ret = Con::getReturnBuffer( bufSize );
Con::expandScriptFilename(ret, bufSize, argv[1]);
return ret;
}
@ -355,8 +356,9 @@ ConsoleFunction(expandOldFilename, const char*, 2, 2, "(string filename)"
"@ingroup FileSystem")
{
TORQUE_UNUSED(argc);
char* ret = Con::getReturnBuffer( 1024 );
Con::expandOldScriptFilename(ret, 1024, argv[1]);
static const U32 bufSize = 1024;
char* ret = Con::getReturnBuffer( bufSize );
Con::expandOldScriptFilename(ret, bufSize, argv[1]);
return ret;
}
@ -368,8 +370,9 @@ ConsoleToolFunction(collapseFilename, const char*, 2, 2, "(string filename)"
"@internal Editor use only")
{
TORQUE_UNUSED(argc);
char* ret = Con::getReturnBuffer( 1024 );
Con::collapseScriptFilename(ret, 1024, argv[1]);
static const U32 bufSize = 1024;
char* ret = Con::getReturnBuffer( bufSize );
Con::collapseScriptFilename(ret, bufSize, argv[1]);
return ret;
}