programs/net: WriteFile should output the number of bytes in the char* array, not the length of the WCHAR* array

Hugh McMaster hugh.mcmaster at outlook.com
Thu Jun 18 20:35:58 CDT 2015


---
 programs/net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/net/net.c b/programs/net/net.c
index 0d5de52..7149ea8 100644
--- a/programs/net/net.c
+++ b/programs/net/net.c
@@ -49,7 +49,7 @@ static int output_write(const WCHAR* str, int len)
 
         WideCharToMultiByte(GetConsoleOutputCP(), 0, str, len, strA, lenA,
                             NULL, NULL);
-        WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), strA, len, &count, FALSE);
+        WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), strA, lenA, &count, FALSE);
         HeapFree(GetProcessHeap(), 0, strA);
     }
     return count;
-- 
1.9.1




More information about the wine-patches mailing list