kernel32: fix TRACE in WideCharToMultiByte to not cause exception with non-null terminated input

Robert Reif reif at earthlink.net
Sat Aug 26 09:15:27 CDT 2006


-------------- next part --------------
diff -p -u -r1.76 locale.c
--- dlls/kernel/locale.c	18 Aug 2006 10:42:47 -0000	1.76
+++ dlls/kernel/locale.c	26 Aug 2006 14:12:17 -0000
@@ -1662,7 +1662,8 @@ INT WINAPI WideCharToMultiByte( UINT pag
         }
         ret = 0;
     }
-    TRACE("cp %d %s -> %s\n", page, debugstr_w(src), debugstr_a(dst));
+    TRACE("cp %d %s -> %s, ret = %d\n", page, srclen == -1 ? debugstr_w(src) :
+          debugstr_wn(src, srclen) , debugstr_a(dst), ret);
     return ret;
 }
 


More information about the wine-patches mailing list