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

Skip to content

Commit 56785ea

Browse files
committed
Issue #9566: Fix compiler warning on Windows 64-bit
1 parent 7969773 commit 56785ea

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/fileutils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ wchar_t*
707707
_Py_wgetcwd(wchar_t *buf, size_t size)
708708
{
709709
#ifdef MS_WINDOWS
710-
return _wgetcwd(buf, size);
710+
int isize = (int)Py_MIN(size, INT_MAX);
711+
return _wgetcwd(buf, isize);
711712
#else
712713
char fname[PATH_MAX];
713714
wchar_t *wname;

0 commit comments

Comments
 (0)