Hugh McMaster : net: WriteFile should output the number of bytes in the char array, not the length of the WCHAR array.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 19 07:19:14 CDT 2015


Module: wine
Branch: master
Commit: ba7d599b6f661ef16a337e5b433c0c392948a799
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ba7d599b6f661ef16a337e5b433c0c392948a799

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Fri Jun 19 11:35:58 2015 +1000

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

---

 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;




More information about the wine-cvs mailing list