Fix py_args[] population
This commit is contained in:
1 parent
912d9be2d1
commit
997e5aac3e
1 file changed
+2
-3
@@ -431,9 +431,8 @@ static int CmdScriptRun(const char *Cmd) {
|
||||
PyConfig_Clear(&py_conf);
|
||||
#else
|
||||
wchar_t *py_args[argc + 1];
|
||||
py_args[0] = Py_DecodeLocale(filename, NULL);
|
||||
for (int i = 0; i < argc; i++) {
|
||||
py_args[i + 1] = Py_DecodeLocale(argv[i], NULL);
|
||||
for (int i = 0; i <= argc; i++) {
|
||||
py_args[i] = Py_DecodeLocale(argv[i], NULL);
|
||||
}
|
||||
|
||||
PySys_SetArgv(argc + 1, py_args);
|
||||
|
||||
Reference in new issue
Block a user