diff options
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r-- | Modules/getpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 85e737b..e6a3e8e 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -449,8 +449,8 @@ search_for_exec_prefix(const _PyCoreConfig *core_config, n = fread(buf, 1, MAXPATHLEN, f); buf[n] = '\0'; fclose(f); - rel_builddir_path = _Py_DecodeUTF8_surrogateescape(buf, n, NULL); - if (rel_builddir_path != NULL) { + rel_builddir_path = _Py_DecodeUTF8_surrogateescape(buf, n); + if (rel_builddir_path) { wcsncpy(exec_prefix, calculate->argv0_path, MAXPATHLEN); exec_prefix[MAXPATHLEN] = L'\0'; joinpath(exec_prefix, rel_builddir_path); |