Skip to content

Commit

Permalink
null-terminate output of tb_utf8_unicode_to_char
Browse files Browse the repository at this point in the history
  • Loading branch information
adsr committed Feb 9, 2024
1 parent f6fb363 commit 5861caf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions termbox2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,7 @@ int tb_utf8_unicode_to_char(char *out, uint32_t c) {
c >>= 6;
}
out[0] = c | first;
out[len] = '\0';

return len;
}
Expand Down

0 comments on commit 5861caf

Please sign in to comment.