various fixes and memory corruption bug.

This commit is contained in:
Jeff Hutchinson 2021-09-09 19:30:32 -04:00
parent 27a4868b6e
commit 35b33f1864
4 changed files with 35 additions and 8 deletions

View file

@ -1643,13 +1643,13 @@ static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue a
{
ConsoleValue val;
val.setString(methodRes);
return std::move(val);
return val;
}
if(object->getNamespace())
{
U32 ident = object->getId();
const char* oldIdent = argv[1].getString();
const char* oldIdent = dStrdup(argv[1].getString());
Namespace::Entry *ent = object->getNamespace()->lookup(funcName);
@ -1671,8 +1671,9 @@ static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue a
// Twiddle it back
argv[1].setString(oldIdent);
dFree(oldIdent);
return std::move(ret);
return ret;
}
warnf(ConsoleLogEntry::Script, "Con::execute - %d has no namespace: %s", object->getId(), funcName);