1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 08:13:03 +01:00

Make sure we compare wchars to wchars instead of bytes

This commit is contained in:
jfreegman 2022-02-03 13:01:08 -05:00
parent 93b3bbd5f6
commit 6a203fd7bf
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -593,22 +593,22 @@ void line_info_print(ToxWindow *self)
wprintw(win, "%s %s: ", user_settings->line_normal, line->name1); wprintw(win, "%s %s: ", user_settings->line_normal, line->name1);
wattroff(win, COLOR_PAIR(nameclr)); wattroff(win, COLOR_PAIR(nameclr));
if (line->msg[0] == 0) { if (line->msg[0] == L'\0') {
waddch(win, '\n'); waddch(win, '\n');
break; break;
} }
if (line->msg[0] == '>') { if (line->msg[0] == L'>') {
wattron(win, COLOR_PAIR(GREEN)); wattron(win, COLOR_PAIR(GREEN));
} else if (line->msg[0] == '<') { } else if (line->msg[0] == L'<') {
wattron(win, COLOR_PAIR(RED)); wattron(win, COLOR_PAIR(RED));
} }
print_wrap(win, line, max_x, max_y); print_wrap(win, line, max_x, max_y);
if (line->msg[0] == '>') { if (line->msg[0] == L'>') {
wattroff(win, COLOR_PAIR(GREEN)); wattroff(win, COLOR_PAIR(GREEN));
} else if (line->msg[0] == '<') { } else if (line->msg[0] == L'<') {
wattroff(win, COLOR_PAIR(RED)); wattroff(win, COLOR_PAIR(RED));
} }
@ -667,7 +667,7 @@ void line_info_print(ToxWindow *self)
wprintw(win, "$ "); wprintw(win, "$ ");
wattroff(win, COLOR_PAIR(GREEN)); wattroff(win, COLOR_PAIR(GREEN));
if (line->msg[0]) { if (line->msg[0] != L'\0') {
print_wrap(win, line, max_x, max_y); print_wrap(win, line, max_x, max_y);
} }