fixes crash when callOnChildren

Anis and me managed to fix this: #1508
This commit is contained in:
Alex Piola 2016-03-04 18:03:21 +01:00
parent e9b0e966a3
commit 07cf85143b
2 changed files with 9 additions and 4 deletions

View file

@ -233,8 +233,11 @@ void SimSet::callOnChildren( const String &method, S32 argc, ConsoleValueRef arg
{
// Prep the arguments for the console exec...
// Make sure and leave args[1] empty.
ConsoleValueRef args[21];
args[0] = method.c_str();
ConsoleValueRef args[21] = { };
ConsoleValue name_method;
name_method.setStackStringValue(method.c_str());
args[0] = ConsoleValueRef::fromValue(&name_method);
for (S32 i = 0; i < argc; i++)
args[i + 2] = argv[i];