pm3 calling python scripts: give full path to script in argv[0]

This commit is contained in:
Philippe Teuwen 2024-08-11 11:53:13 +02:00
commit 3a5f3e94d1

View file

@ -429,7 +429,7 @@ static int CmdScriptRun(const char *Cmd) {
//int argc, char ** argv //int argc, char ** argv
char *argv[128]; char *argv[128];
argv[0] = filename; argv[0] = script_path;
int argc = split(arguments, &argv[1]); int argc = split(arguments, &argv[1]);
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 10 #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 10
wchar_t *py_args[argc + 1]; wchar_t *py_args[argc + 1];