]> granicus.if.org Git - python/commitdiff
Apply Martin's patch for bug 3685, Crash while compiling Python 3000 in
authorBarry Warsaw <barry@python.org>
Fri, 17 Oct 2008 01:15:29 +0000 (01:15 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 17 Oct 2008 01:15:29 +0000 (01:15 +0000)
OpenBSD 4.4.

Python/sysmodule.c

index 89f50b536e87913e79f08766ed13dfc640a62bf5..10a87611c0d7d30e523262cf93308ab99a9fe8f5 100644 (file)
@@ -1387,7 +1387,7 @@ makepathobject(const wchar_t *path, wchar_t delim)
        for (i = 0; ; i++) {
                p = wcschr(path, delim);
                if (p == NULL)
-                       p = wcschr(path, L'\0'); /* End of string */
+                       p = path + wcslen(path); /* End of string */
                w = PyUnicode_FromWideChar(path, (Py_ssize_t)(p - path));
                if (w == NULL) {
                        Py_DECREF(v);