From f335391efdefbcf5f4da2985d8d214340c69f329 Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 21 Apr 2008 01:49:46 +0000 Subject: - visio: simulate old behavior, rejecting non-ascii characters for NOECHO (pw) input. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4221 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/visio.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mbbsd/visio.c') diff --git a/mbbsd/visio.c b/mbbsd/visio.c index b4b17fd1..641406a2 100644 --- a/mbbsd/visio.c +++ b/mbbsd/visio.c @@ -1052,6 +1052,14 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA } c = tolower(c); } + // XXX for NOECHO, allow only isprint() characters? + if (flags & VGET_NOECHO) + { + if (!isprint(c)) + { + bell(); continue; + } + } // size check if(iend+1 >= len) -- cgit v1.2.3