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

Fixed incorrectly handled error check for longchars

This commit is contained in:
Grayson MacKenzie 2014-03-16 20:18:31 -04:00
parent b5cbd8e410
commit e6c68143bd

View File

@ -393,14 +393,15 @@ void draw_active_window(Tox *m)
/* Handle input */
#ifdef HAVE_WIDECHAR
wget_wch(stdscr, &ch);
if (wget_wch(stdscr, &ch) == ERR)
#else
ch = getch();
if ((ch = getch()) == ERR)
#endif
return;
if (ch == T_KEY_NEXT || ch == T_KEY_PREV) {
set_next_window((int) ch);
} else if (ch != ERR) {
} else {
pthread_mutex_lock(&Winthread.lock);
a->onKey(a, m, ch);
pthread_mutex_unlock(&Winthread.lock);