From 256d89c5bf70b51b9d7c80d8162d61e254f44f06 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 10 Aug 2019 14:28:44 -0400 Subject: [PATCH] win: use L'\0' as UTF-16 null terminator uv__convert_utf8_to_utf16() always null terminates its UTF-16 output. This commit updates the code to use L'\0' as the terminator, instead of '\0'. --- src/win/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/util.c b/src/win/util.c index 4c5c429ce86..b0969dab423 100644 --- a/src/win/util.c +++ b/src/win/util.c @@ -1325,7 +1325,7 @@ int uv__convert_utf8_to_utf16(const char* utf8, int utf8len, WCHAR** utf16) { return uv_translate_sys_error(GetLastError()); } - (*utf16)[bufsize] = '\0'; + (*utf16)[bufsize] = L'\0'; return 0; }