From 1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6 Mon Sep 17 00:00:00 2001 From: in2 Date: Sun, 25 Apr 2004 12:00:45 +0000 Subject: discard r1854, dirty hack to ignore "\0" in vmsg_lines() (but igetch() should NOT return "\0") git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1855 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/stuff.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 1bf292ea..3141cc26 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -418,7 +418,7 @@ vmsg_lines(const int lines, const char msg[]) do { if( (ch = igetch()) == Ctrl('T') ) capture_screen(); - } while( (ch != ' ') && (ch != KEY_LEFT) && (ch != '\r') && (ch != '\n') ); + } while( ch == 0 ); move(lines, 0); clrtoeol(); @@ -428,13 +428,12 @@ vmsg_lines(const int lines, const char msg[]) int getans(const char *fmt,...) { - char msg[80] = {0}, ans[2] = {0}; + char msg[80] = {0}; va_list ap; va_start(ap, fmt); vsnprintf(msg, sizeof(msg), fmt, ap); va_end(ap); - getdata(b_lines - 1, 0, msg, ans, sizeof(ans), LCECHO); - return ans[0]; + return vmsg_lines(b_lines, msg); } int -- cgit v1.2.3