From 3e0c9e79e478434fc3e3ac57f8f6fb1229131de8 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 19 Feb 2026 11:45:52 +0100 Subject: [PATCH] cleanup: Correct comparison in cons_show_wins() g_strstr_len() actually returns a gchar* to the position. So it is not like in the case of strlen() where it returns the number of bytes. --- src/ui/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/console.c b/src/ui/console.c index c79b1c67..e65f01fa 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -448,7 +448,7 @@ cons_show_wins(gboolean unread) GSList* curr = window_strings; while (curr) { - if (g_strstr_len(curr->data, strlen(curr->data), " unread") > 0) { + if (g_strstr_len(curr->data, strlen(curr->data), " unread") != NULL) { win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", curr->data); } else { win_println(console, THEME_DEFAULT, "-", "%s", curr->data); @@ -469,7 +469,7 @@ cons_show_wins_attention(void) GSList* curr = window_strings; while (curr) { - if (g_strstr_len(curr->data, strlen(curr->data), " unread") > 0) { + if (g_strstr_len(curr->data, strlen(curr->data), " unread") != NULL) { win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", curr->data); } else { win_println(console, THEME_DEFAULT, "-", "%s", curr->data);