From: Victor Stinner Date: Fri, 23 Jun 2017 13:21:24 +0000 (+0200) Subject: bpo-30602: Fix lastarg in os.spawnve() (#2287) (#2357) X-Git-Tag: v3.6.3rc1~314 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c472fb6b2744b36c7a0823c20e0d5ac9be3ea623;p=thirdparty%2FPython%2Fcpython.git bpo-30602: Fix lastarg in os.spawnve() (#2287) (#2357) Fix a regression introduced by myself in the commit 526b22657cb18fe79118c2ea68511aca09430c2c. (cherry picked from commit c8d6ab2e25ff212702d387e516e258b1d8c52910) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 0a9123b61bdc..11aaeef02bc5 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");