From 56785eab33596af189c10ee7ebdc36fc2cd1e983 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 5 Jun 2013 00:46:29 +0200 Subject: Issue #9566: Fix compiler warning on Windows 64-bit --- Python/fileutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v0.12