diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 0a9123b61bd..11aaeef02bc 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -5189,7 +5189,7 @@ os_spawnve_impl(PyObject *module, int mode, path_t *path, PyObject *argv, goto fail_1; } if (i == 0 && !argvlist[0][0]) { - lastarg = i; + lastarg = i + 1; PyErr_SetString( PyExc_ValueError, "spawnv() arg 2 first element cannot be empty");