Skip to content

Commit

Permalink
cross: more triples, broader support
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Sep 14, 2024
1 parent 99144ad commit 11ed26f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion watcher-c/src/watcher-c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {
Just here conventionally. This buffer should be exactly 4096, also conventionally.
*/
static int utf16_to_utf8(wchar_t const* utf16_buf, char* utf8_buf, int utf8_buf_len) {
if (!utf16_buf || !utf8_buf) return;
if (!utf16_buf || !utf8_buf) return -1;
static int const utf16_buf_len = -1;
int wrote = WideCharToMultiByte(CP_UTF8, 0, utf16_buf, utf16_buf_len, utf8_buf, utf8_buf_len, NULL, NULL);
if (wrote <= 0) {
Expand Down

0 comments on commit 11ed26f

Please sign in to comment.