summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-04 22:46:29 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-04 22:46:29 (GMT)
commit56785eab33596af189c10ee7ebdc36fc2cd1e983 (patch)
treefc0aa2e16eb471008a25d21356bd9548147b6704 /Python
parent796977360f4250c5a0e90f5ec230ac0af36d3c62 (diff)
downloadcpython-56785eab33596af189c10ee7ebdc36fc2cd1e983.zip
cpython-56785eab33596af189c10ee7ebdc36fc2cd1e983.tar.gz
cpython-56785eab33596af189c10ee7ebdc36fc2cd1e983.tar.bz2
Issue #9566: Fix compiler warning on Windows 64-bit
Diffstat (limited to 'Python')
-rw-r--r--Python/fileutils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c
index bb0cd43..293cb77 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;