summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-25 20:00:45 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-25 20:00:45 +0800
commit1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6 (patch)
tree61c904f1a502a8e0ca0285296b460ee3f5b54932
parent9597ae1b4e39c723c06bab688474a28d59ac08ef (diff)
downloadpttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.tar
pttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.tar.gz
pttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.tar.bz2
pttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.tar.lz
pttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.tar.xz
pttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.tar.zst
pttbbs-1ebeeb92186b0631fe1f04ffed1e6a150b2a40e6.zip
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
-rw-r--r--mbbsd/stuff.c7
1 files 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