diff Python/fileutils.c @ 84034:88a21c5a97ef

Issue #9566: Fix compiler warning on Windows 64-bit
author Victor Stinner <victor.stinner@gmail.com>
date Wed, 05 Jun 2013 00:46:29 +0200
parents 2ea629da4f54
children dfc020b4b123
line wrap: on
line diff
--- a/Python/fileutils.c	Wed Jun 05 00:44:00 2013 +0200
+++ b/Python/fileutils.c	Wed Jun 05 00:46:29 2013 +0200
@@ -707,7 +707,8 @@
 _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;