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
1 changed files with 6 additions and 6 deletions

View File

@ -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);
}