From db419a27c1c0c54427ba9fa0995e7e607facd07a Mon Sep 17 00:00:00 2001 From: Ilia Maslakov Date: Tue, 13 Oct 2009 07:08:00 +0000 Subject: [PATCH] Ticket #1706 fixed tty_print_anychar, replaced addch to addstr when MC build with ncurses library. Signed-off-by: Ilia Maslakov --- src/tty/tty-ncurses.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/tty/tty-ncurses.c b/src/tty/tty-ncurses.c index 8371d41c9..fd6c4da8b 100644 --- a/src/tty/tty-ncurses.c +++ b/src/tty/tty-ncurses.c @@ -308,18 +308,14 @@ tty_print_anychar (int c) { unsigned char str[6 + 1]; - if (c > 255) { - int res = g_unichar_to_utf8 (c, (char *) str); - if (res == 0) { - str[0] = '.'; - str[1] = '\0'; - } else { - str[res] = '\0'; - } - addstr (str_term_form ((char *) str)); + int res = g_unichar_to_utf8 (c, (char *) str); + if (res == 0) { + str[0] = '.'; + str[1] = '\0'; } else { - addch (c); + str[res] = '\0'; } + addstr (str_term_form ((char *) str)); } void