From 1a08194dfe0cb48f6de601a853ee8c154f10254c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 4 Mar 2013 17:03:53 +0200 Subject: [PATCH] Prevent input of non-ascii characters (from Edoardo Spadolini) --- TODO | 3 +++ mygetnstr.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 7a1e36d..afc4140 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,7 @@ +-pass the correct terminal size to nethack. (dgl handles + term resizes correctly, but nethack doesn't see the new size) + -allow setting banners for the internal menus, with the same method as normal user-defined menus, but only the banner is used from them. if no such menu is defined, then uses the default banner file. diff --git a/mygetnstr.c b/mygetnstr.c index 38e479a..2d5980f 100644 --- a/mygetnstr.c +++ b/mygetnstr.c @@ -81,7 +81,7 @@ mygetnstr(char *buf, int maxlen, int doecho) addstr("\010 \010"); } } - else if ((c >= ' ' && c <= '~') || (c >= 0xA0 && c <= 0xFF)) + else if ((c >= ' ' && c <= '~')) { if (i < maxlen) { -- 2.47.3