From 460ce2abf7dbb93ba1583c27176b9f0c8ea44232 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 17 Oct 2008 01:15:29 +0000 Subject: [PATCH] Apply Martin's patch for bug 3685, Crash while compiling Python 3000 in OpenBSD 4.4. --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 89f50b536e..10a87611c0 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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); -- 2.40.0