diff Python/dynload_win.c @ 82936:4db1b0bb3683 3.3

Fixes issue4653 - Correctly specify the buffer size to FormatMessageW and correctly check for errors on two CreateFileMapping calls.
author Gregory P. Smith <greg@krypto.org>
date Sat, 23 Mar 2013 16:05:36 -0700
parents 38d7d944370e
children ec854f76d6b9
line wrap: on
line diff
--- a/Python/dynload_win.c	Sat Mar 23 23:36:23 2013 +0200
+++ b/Python/dynload_win.c	Sat Mar 23 16:05:36 2013 -0700
@@ -235,7 +235,7 @@
                            SUBLANG_DEFAULT),
                            /* Default language */
                 theInfo, /* the buffer */
-                sizeof(theInfo), /* the buffer size */
+                sizeof(theInfo) / sizeof(wchar_t), /* size in wchars */
                 NULL); /* no additional format args. */
 
             /* Problem: could not get the error message.