[1/5] ntdll: Fix incorrect value added to out->used in pf_output_stringA (try 2)

Sebastian Lackner sebastian at fds-team.de
Fri Dec 20 00:45:48 CST 2013


Since there wasn't any response yet to my previous attempt I decided to
split it up into all the individual modifications/fixes, so that
hopefully at least the most important ones can get upstream soon.

This patch fixes a line, where accidentally the number of bytes is added
to out->used, and not the number of characters (as in all the lines before).

---
 dlls/ntdll/printf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-------------- next part --------------
From 604874b4c5677706443d74daddd20e467436c13e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian at fds-team.de>
Date: Fri, 20 Dec 2013 05:54:09 +0100
Subject: ntdll: Fix incorrect value added to out->used in pf_output_stringA

---
 dlls/ntdll/printf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ntdll/printf.c b/dlls/ntdll/printf.c
index 0a27f7e..49d3983 100644
--- a/dlls/ntdll/printf.c
+++ b/dlls/ntdll/printf.c
@@ -137,7 +137,7 @@ static inline int pf_output_stringA( pf_output *out, LPCSTR str, int len )
             return len;
         }
         if (space > 0) RtlMultiByteToUnicodeN( p, space * sizeof(WCHAR), NULL, str, len );
-        out->used += n;
+        out->used += n / sizeof(WCHAR);
     }
     return -1;
 }
-- 
1.7.9.5



More information about the wine-patches mailing list