msi:clean up TRACE statements in format.c

Aric Stewart aric at codeweavers.com
Fri Jun 3 10:56:37 CDT 2005


Make sure the TRACE statements do not spew garbage by using debugstr_wn
-------------- next part --------------
Index: dlls/msi/format.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/format.c,v
retrieving revision 1.16
diff -u -r1.16 format.c
--- dlls/msi/format.c	1 Jun 2005 11:02:48 -0000	1.16
+++ dlls/msi/format.c	3 Jun 2005 15:47:37 -0000
@@ -403,7 +403,7 @@
         return 0;
     }
 
-    TRACE("Starting with %s\n",debugstr_w(ptr));
+    TRACE("Starting with %s\n",debugstr_wn(ptr,len));
 
     /* scan for special characters... fast exit */
     if ((!scanW(ptr,'[',len) || (scanW(ptr,'[',len) && !scanW(ptr,']',len))) && 
@@ -435,8 +435,8 @@
         {
             LPBYTE nd2;
 
-            TRACE("after value %s .. %s\n",debugstr_w((LPWSTR)newdata),
-                                       debugstr_w(mark));
+            TRACE("after value %s \n",debugstr_wn((LPWSTR)newdata,
+                                    size/sizeof(WCHAR)));
             chunk = (len - (progress - ptr)) * sizeof(WCHAR);
             TRACE("after chunk is %li + %li\n",size,chunk);
             if (size)
@@ -477,7 +477,8 @@
             key = value;
         }
 
-        TRACE("Current %s .. %s\n",debugstr_w((LPWSTR)newdata),debugstr_w(key));
+        TRACE("Current %s .. %s\n",debugstr_wn((LPWSTR)newdata, 
+                                size/sizeof(WCHAR)),debugstr_w(key));
 
         if (!package)
         {
@@ -566,7 +567,8 @@
         progress = mark2+1;
     }
 
-    TRACE("after everything %s\n",debugstr_w((LPWSTR)newdata));
+    TRACE("after everything %s\n",debugstr_wn((LPWSTR)newdata, 
+                            size/sizeof(WCHAR)));
 
     *data = (LPWSTR)newdata;
     return size / sizeof(WCHAR);


More information about the wine-patches mailing list