winedbg x/u fix

Matt Chapman matthewc at cse.unsw.edu.au
Tue Feb 24 00:45:16 CST 2004


This patch fixes dumping of Unicode strings in winedbg, lin
is a char * ptr which is only incremented by to_write rather
than sizeof(WCHAR)*to_write.  I've changed lin to be WCHAR *
(alternate fix would be to explicitly increment by above).

Before:
Wine-dbg>x/u 0x403cdb38
RAW Image Procese Processing setsing settings

After:
Wine-dbg>x/u 0x403cdb38
RAW Image Processing settings

Matt

-------------- next part --------------
Index: memory.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/memory.c,v
retrieving revision 1.7
diff -u -r1.7 memory.c
--- memory.c	3 Feb 2004 00:14:12 -0000	1.7
+++ memory.c	24 Feb 2004 06:38:09 -0000
@@ -374,7 +374,7 @@
 
 int  DEBUG_PrintStringW(const DBG_ADDR* address, int len)
 {
-    char*       lin = (void*)DEBUG_ToLinear(address);
+    WCHAR*      lin = (void*)DEBUG_ToLinear(address);
     WCHAR       ch[CHARBUFSIZE+1];
     int         written = 0;
 


More information about the wine-patches mailing list