[PATCH 3/3] wscript: Use a zero terminated wchar string.

Michael Stefaniuc mstefani at winehq.org
Tue Nov 3 16:34:35 CST 2020


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 programs/wscript/host.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/programs/wscript/host.c b/programs/wscript/host.c
index ba3a32a935d..e20d3132f16 100644
--- a/programs/wscript/host.c
+++ b/programs/wscript/host.c
@@ -76,8 +76,7 @@ static void print_string(const WCHAR *string)
     len = lstrlenW(string);
     ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), string, len, &count, NULL);
     if(ret) {
-        static const WCHAR crnlW[] = {'\r','\n'};
-        WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), crnlW, ARRAY_SIZE(crnlW), &count, NULL);
+        WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), L"\r\n", lstrlenW(L"\r\n"), &count, NULL);
         return;
     }
 
-- 
2.26.2




More information about the wine-devel mailing list