mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 04:20:30 +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
|
|
@ -343,8 +343,9 @@ DefineEngineMethod( FileObject, peekLine, const char*, (),,
|
|||
|
||||
"@return String containing the line of data that was just peeked\n")
|
||||
{
|
||||
char *line = Con::getReturnBuffer( 512 );
|
||||
object->peekLine( (U8*)line, 512 );
|
||||
static const U32 bufSize = 512;
|
||||
char *line = Con::getReturnBuffer( bufSize );
|
||||
object->peekLine( (U8*)line, bufSize );
|
||||
return line;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,8 +113,9 @@ const char * StreamObject::readLine()
|
|||
if(mStream == NULL)
|
||||
return NULL;
|
||||
|
||||
char *buffer = Con::getReturnBuffer(256);
|
||||
mStream->readLine((U8 *)buffer, 256);
|
||||
static const U32 bufSize = 256;
|
||||
char *buffer = Con::getReturnBuffer(bufSize);
|
||||
mStream->readLine((U8 *)buffer, bufSize);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue