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.
This commit is contained in:
@@ -448,7 +448,7 @@ cons_show_wins(gboolean unread)
|
|||||||
|
|
||||||
GSList* curr = window_strings;
|
GSList* curr = window_strings;
|
||||||
while (curr) {
|
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);
|
win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", curr->data);
|
||||||
} else {
|
} else {
|
||||||
win_println(console, THEME_DEFAULT, "-", "%s", curr->data);
|
win_println(console, THEME_DEFAULT, "-", "%s", curr->data);
|
||||||
@@ -469,7 +469,7 @@ cons_show_wins_attention(void)
|
|||||||
|
|
||||||
GSList* curr = window_strings;
|
GSList* curr = window_strings;
|
||||||
while (curr) {
|
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);
|
win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", curr->data);
|
||||||
} else {
|
} else {
|
||||||
win_println(console, THEME_DEFAULT, "-", "%s", curr->data);
|
win_println(console, THEME_DEFAULT, "-", "%s", curr->data);
|
||||||
|
|||||||
Reference in New Issue
Block a user