diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-08-20 05:15:22 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-08-20 05:15:22 +0000 |
| commit | 8f9f3dbd9d8cbcc816584c548dff03add3f022e1 (patch) | |
| tree | 56b987a9e61e4d21f4380ef1009110af849a1156 | |
| parent | osc: notify: fix bad check for invalid UTF-8 (diff) | |
term_set_window_title(): fix bad check for invalid UTF-8
mbsntoc32() returns (size_t)-1 on failure, not (char32_t)-1.
| -rw-r--r-- | terminal.c | 2 |
1 files changed, 1 insertions, 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); |
