wscript: Use a zero terminated wchar string.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2020-11-03 23:34:35 +01:00 committed by Alexandre Julliard
parent 7f955f289a
commit 453c461095
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}