From 6a203fd7bfb9fa5d4c09c4379978be18da0710f3 Mon Sep 17 00:00:00 2001 From: jfreegman Date: Thu, 3 Feb 2022 13:01:08 -0500 Subject: [PATCH] Make sure we compare wchars to wchars instead of bytes --- src/line_info.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/line_info.c b/src/line_info.c index b163eb5..43c2a38 100644 --- a/src/line_info.c +++ b/src/line_info.c @@ -593,22 +593,22 @@ void line_info_print(ToxWindow *self) wprintw(win, "%s %s: ", user_settings->line_normal, line->name1); wattroff(win, COLOR_PAIR(nameclr)); - if (line->msg[0] == 0) { + if (line->msg[0] == L'\0') { waddch(win, '\n'); break; } - if (line->msg[0] == '>') { + if (line->msg[0] == L'>') { wattron(win, COLOR_PAIR(GREEN)); - } else if (line->msg[0] == '<') { + } else if (line->msg[0] == L'<') { wattron(win, COLOR_PAIR(RED)); } print_wrap(win, line, max_x, max_y); - if (line->msg[0] == '>') { + if (line->msg[0] == L'>') { wattroff(win, COLOR_PAIR(GREEN)); - } else if (line->msg[0] == '<') { + } else if (line->msg[0] == L'<') { wattroff(win, COLOR_PAIR(RED)); } @@ -667,7 +667,7 @@ void line_info_print(ToxWindow *self) wprintw(win, "$ "); wattroff(win, COLOR_PAIR(GREEN)); - if (line->msg[0]) { + if (line->msg[0] != L'\0') { print_wrap(win, line, max_x, max_y); }