From: Victor Stinner Date: Tue, 4 Jun 2013 22:46:29 +0000 (+0200) Subject: Issue #9566: Fix compiler warning on Windows 64-bit X-Git-Tag: v3.4.0a1~568 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56785eab33596af189c10ee7ebdc36fc2cd1e983;p=python Issue #9566: Fix compiler warning on Windows 64-bit --- diff --git a/Python/fileutils.c b/Python/fileutils.c index bb0cd43500..293cb77f55 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -707,7 +707,8 @@ wchar_t* _Py_wgetcwd(wchar_t *buf, size_t size) { #ifdef MS_WINDOWS - return _wgetcwd(buf, size); + int isize = (int)Py_MIN(size, INT_MAX); + return _wgetcwd(buf, isize); #else char fname[PATH_MAX]; wchar_t *wname;