mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-07 06:20:40 +00:00
context safties
and from Marauder, hardened filename entry for con::evaluate/compileexec. if the string forwarded along is not a real filename, consider it an eval block
This commit is contained in:
parent
19d8a5525d
commit
80f62573fe
8 changed files with 21 additions and 18 deletions
|
|
@ -711,12 +711,12 @@ bool Trigger::testCondition()
|
|||
if (objectName != NULL)
|
||||
objectName = getIdString();
|
||||
|
||||
StringTableEntry groupName = getGroup()->getName();
|
||||
StringTableEntry groupName = getGroup() ? getGroup()->getName() : NULL;
|
||||
if (groupName != NULL)
|
||||
groupName = getGroup()->getIdString();
|
||||
|
||||
String context = String::ToString("%s\nGroup: %s, Object: %s", getFilename(), groupName, objectName);
|
||||
Con::evaluate(command.c_str(), false, context);
|
||||
Con::evaluate(command.c_str(), false, context.c_str());
|
||||
if (Con::getBoolVariable(resVar.c_str()) == 1)
|
||||
{
|
||||
return true;
|
||||
|
|
@ -817,7 +817,7 @@ void Trigger::processTick(const Move* move)
|
|||
if (objectName != NULL)
|
||||
objectName = getIdString();
|
||||
|
||||
StringTableEntry groupName = getGroup()->getName();
|
||||
StringTableEntry groupName = getGroup() ? getGroup()->getName() : NULL;
|
||||
if (groupName != NULL)
|
||||
groupName = getGroup()->getIdString();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue