From ba7d599b6f661ef16a337e5b433c0c392948a799 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Fri, 19 Jun 2015 11:35:58 +1000 Subject: [PATCH] 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 0d5de52abaa..7149ea89cb8 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;