summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/sysmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 1a41d2f..df9dfb1 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1895,7 +1895,7 @@ sys_update_path(int argc, wchar_t **argv)
#else /* All other filename syntaxes */
if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) {
#if defined(HAVE_REALPATH)
- if (_Py_wrealpath(argv0, fullpath, PATH_MAX)) {
+ if (_Py_wrealpath(argv0, fullpath, Py_ARRAY_LENGTH(fullpath))) {
argv0 = fullpath;
}
#endif