Michael Stefaniuc : wscript: Use a zero terminated wchar string.

Alexandre Julliard julliard at winehq.org
Wed Nov 4 15:20:31 CST 2020


Module: wine
Branch: master
Commit: 453c461095d59600e646be483119bc83885c9c1d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=453c461095d59600e646be483119bc83885c9c1d

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Tue Nov  3 23:34:35 2020 +0100

wscript: Use a zero terminated wchar string.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard 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;
     }
 




More information about the wine-cvs mailing list