fix handling of multiple arguments running python scripts from console

This commit is contained in:
greerdv
2021-06-09 18:19:28 +01:00
parent 3fd2f1305f
commit 33c5bd874b
@@ -718,7 +718,8 @@ namespace EditorPythonBindings
for (int arg = 0; arg < args.size(); arg++)
{
argv[arg + 1] = Py_DecodeLocale(args[arg].data(), nullptr);
AZStd::string argString(args[arg]);
argv[arg + 1] = Py_DecodeLocale(argString.c_str(), nullptr);
}
// Tell Python the command-line args.
// Note that this has a side effect of adding the script's path to the set of directories checked for "import" commands.