msvcrt: Fix printing NULL strings.

Francois Gouget fgouget at free.fr
Mon Sep 19 16:29:47 CDT 2011


---

This fixes a crash that occurred in the conformance tests on my Solaris 
VMs when tracing was turned on.

 dlls/msvcrt/string.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index 31ba8d4..608401d 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -842,7 +842,7 @@ __int64 CDECL MSVCRT_strtoi64_l(const char *nptr, char **endptr, int base, MSVCR
     BOOL negative = FALSE;
     __int64 ret = 0;
 
-    TRACE("(%s %p %d %p)\n", nptr, endptr, base, locale);
+    TRACE("(%s %p %d %p)\n", debugstr_a(nptr), endptr, base, locale);
 
     if (!MSVCRT_CHECK_PMT(nptr != NULL) || !MSVCRT_CHECK_PMT(base == 0 || base >= 2) ||
         !MSVCRT_CHECK_PMT(base <= 36)) {
@@ -922,7 +922,7 @@ unsigned __int64 CDECL MSVCRT_strtoui64_l(const char *nptr, char **endptr, int b
     BOOL negative = FALSE;
     unsigned __int64 ret = 0;
 
-    TRACE("(%s %p %d %p)\n", nptr, endptr, base, locale);
+    TRACE("(%s %p %d %p)\n", debugstr_a(nptr), endptr, base, locale);
 
     if (!MSVCRT_CHECK_PMT(nptr != NULL) || !MSVCRT_CHECK_PMT(base == 0 || base >= 2) ||
         !MSVCRT_CHECK_PMT(base <= 36)) {
-- 
1.7.5.4




More information about the wine-patches mailing list