Skip to content

Commit

Permalink
win: use L'\0' as UTF-16 null terminator
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
cjihrig committed Aug 12, 2019
1 parent 1357a52 commit 256d89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 256d89c

Please sign in to comment.