Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 460ce2a

Browse files
committed
Apply Martin's patch for bug 3685, Crash while compiling Python 3000 in
OpenBSD 4.4.
1 parent 9b6df6a commit 460ce2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/sysmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ makepathobject(const wchar_t *path, wchar_t delim)
13871387
for (i = 0; ; i++) {
13881388
p = wcschr(path, delim);
13891389
if (p == NULL)
1390-
p = wcschr(path, L'\0'); /* End of string */
1390+
p = path + wcslen(path); /* End of string */
13911391
w = PyUnicode_FromWideChar(path, (Py_ssize_t)(p - path));
13921392
if (w == NULL) {
13931393
Py_DECREF(v);

0 commit comments

Comments
 (0)