summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-25 19:37:47 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-25 19:37:47 +0800
commit9597ae1b4e39c723c06bab688474a28d59ac08ef (patch)
tree1dffb94a234380c8a4f30b844c5fb4932f0c6fe2 /mbbsd/stuff.c
parent4998037cba9abef044b4d3d0626d2626970e5eea (diff)
downloadpttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.tar
pttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.tar.gz
pttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.tar.bz2
pttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.tar.lz
pttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.tar.xz
pttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.tar.zst
pttbbs-9597ae1b4e39c723c06bab688474a28d59ac08ef.zip
r1851 dirty fixed vmsg_lines(), but broke getans()
this patch dirty fixes getans() and sould be discarded after fix dogetch(). git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1854 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index ab542695..1bf292ea 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -428,12 +428,13 @@ vmsg_lines(const int lines, const char msg[])
int
getans(const char *fmt,...)
{
- char msg[80] = {0};
+ char msg[80] = {0}, ans[2] = {0};
va_list ap;
va_start(ap, fmt);
vsnprintf(msg, sizeof(msg), fmt, ap);
va_end(ap);
- return vmsg_lines(b_lines, msg);
+ getdata(b_lines - 1, 0, msg, ans, sizeof(ans), LCECHO);
+ return ans[0];
}
int