diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 7dcec358..63813af3 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -232,11 +232,11 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos) if (entry->hidden) term_addch(root_window, ' '); - else if (*p >= 32 && (entry->utf8 || (*p & 127) >= 32)) + else if (*p >= 32 && (*p < 0x7F || *p > 0x9F)) term_add_unichar(root_window, *p); else { term_set_color(root_window, ATTR_RESET|ATTR_REVERSE); - term_addch(root_window, *p+'A'-1); + term_addch(root_window, (*p & 127)+'A'-1); term_set_color(root_window, ATTR_RESET); } }