diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-08-20 05:14:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-08-20 05:14:53 +0000 |
| commit | 7dd204fd319222c1e500b2c117b4ed62f9e642af (patch) | |
| tree | e0c997930c5db93b140bfcb32befc065f17632aa /osc.c | |
| parent | changelog: resize-keep-grid (diff) | |
osc: notify: fix bad check for invalid UTF-8
mbsntoc32() returns (size_t)-1 on failure, not (char32_t)-1.
Diffstat (limited to 'osc.c')
| -rw-r--r-- | osc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -547,12 +547,12 @@ osc_notify(struct terminal *term, char *string) if (title == NULL) return; - if (mbsntoc32(NULL, title, strlen(title), 0) == (char32_t)-1) { + if (mbsntoc32(NULL, title, strlen(title), 0) == (size_t)-1) { LOG_WARN("%s: notification title is not valid UTF-8, ignoring", title); return; } - if (msg != NULL && mbsntoc32(NULL, msg, strlen(msg), 0) == (char32_t)-1) { + if (msg != NULL && mbsntoc32(NULL, msg, strlen(msg), 0) == (size_t)-1) { LOG_WARN("%s: notification message is not valid UTF-8, ignoring", msg); return; } |
