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'. Fixes: https://github.com/libuv/libuv/issues/2413 PR-URL: https://github.com/libuv/libuv/pull/2419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
b0fd17193e
commit
6c9c4fe991
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user