mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
term_set_window_title(): fix bad check for invalid UTF-8
mbsntoc32() returns (size_t)-1 on failure, not (char32_t)-1.
This commit is contained in:
parent
7dd204fd31
commit
8f9f3dbd9d
1 changed files with 1 additions and 1 deletions
|
|
@ -3528,7 +3528,7 @@ term_set_window_title(struct terminal *term, const char *title)
|
|||
if (term->window_title != NULL && streq(term->window_title, title))
|
||||
return;
|
||||
|
||||
if (mbsntoc32(NULL, title, strlen(title), 0) == (char32_t)-1) {
|
||||
if (mbsntoc32(NULL, title, strlen(title), 0) == (size_t)-1) {
|
||||
/* It's an xdg_toplevel::set_title() protocol violation to set
|
||||
a title with an invalid UTF-8 sequence */
|
||||
LOG_WARN("%s: title is not valid UTF-8, ignoring", title);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue