mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Fix buffer corruption.
This commit is contained in:
parent
6d93e96dc3
commit
27a4868b6e
4 changed files with 14 additions and 7 deletions
|
|
@ -512,10 +512,13 @@ bool GameConnection::readConnectRequest(BitStream *stream, const char **errorStr
|
||||||
connectArgv[2].setString(buffer);
|
connectArgv[2].setString(buffer);
|
||||||
|
|
||||||
// NOTE: Cannot convert over to IMPLEMENT_CALLBACK as it has variable args.
|
// NOTE: Cannot convert over to IMPLEMENT_CALLBACK as it has variable args.
|
||||||
const char *ret = Con::execute(this, mConnectArgc + 3, connectArgv);
|
ConsoleValue returnValue = Con::execute(this, mConnectArgc + 3, connectArgv);
|
||||||
if(ret[0])
|
|
||||||
|
StringTableEntry returnStr = StringTable->insert(returnValue.getString());
|
||||||
|
|
||||||
|
if(returnStr[0])
|
||||||
{
|
{
|
||||||
*errorString = ret;
|
*errorString = returnStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -2286,7 +2286,8 @@ DefineEngineStringlyVariadicFunction( call, const char *, 2, 0, "( string functi
|
||||||
"@endtsexample\n\n"
|
"@endtsexample\n\n"
|
||||||
"@ingroup Scripting" )
|
"@ingroup Scripting" )
|
||||||
{
|
{
|
||||||
return Con::execute( argc - 1, argv + 1 );
|
ConsoleValue returnValue = Con::execute(argc - 1, argv + 1);
|
||||||
|
return Con::getReturnBuffer(returnValue.getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -2972,7 +2972,8 @@ DefineEngineStringlyVariadicMethod( SimObject, call, const char*, 3, 0, "( strin
|
||||||
"@return The result of the method call." )
|
"@return The result of the method call." )
|
||||||
{
|
{
|
||||||
argv[1].setString(argv[2]);
|
argv[1].setString(argv[2]);
|
||||||
return Con::execute( object, argc - 1, argv + 1 );
|
ConsoleValue returnValue = Con::execute(object, argc - 1, argv + 1);
|
||||||
|
return Con::getReturnBuffer(returnValue.getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -120,12 +120,14 @@ void PopupMenu::handleSelectEvent(U32 popID, U32 command)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool PopupMenu::onMessageReceived(StringTableEntry queue, const char* event, const char* data)
|
bool PopupMenu::onMessageReceived(StringTableEntry queue, const char* event, const char* data)
|
||||||
{
|
{
|
||||||
return Con::executef(this, "onMessageReceived", queue, event, data);
|
ConsoleValue returnValue = Con::executef(this, "onMessageReceived", queue, event, data);
|
||||||
|
return returnValue.getBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PopupMenu::onMessageObjectReceived(StringTableEntry queue, Message *msg )
|
bool PopupMenu::onMessageObjectReceived(StringTableEntry queue, Message *msg )
|
||||||
{
|
{
|
||||||
return Con::executef(this, "onMessageReceived", queue, Con::getIntArg(msg->getId()));
|
ConsoleValue returnValue = Con::executef(this, "onMessageReceived", queue, Con::getIntArg(msg->getId()));
|
||||||
|
return returnValue.getBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue