summaryrefslogtreecommitdiffstats
path: root/mbbsd/card.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-06 22:16:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-06 22:16:22 +0800
commit9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da (patch)
tree20da85027c77ca7641486e5663edadfa832c1a5f /mbbsd/card.c
parentf860729aeaacf1bacf196ee96362b58ddb6e3af1 (diff)
downloadpttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.tar
pttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.tar.gz
pttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.tar.bz2
pttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.tar.lz
pttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.tar.xz
pttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.tar.zst
pttbbs-9c4e5e52c6b9de0ff0873fd76a3d187a19fb45da.zip
card: make prompt message more clear, and accept user response better
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4497 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/card.c')
-rw-r--r--mbbsd/card.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mbbsd/card.c b/mbbsd/card.c
index 8d5ba389..c3b33d08 100644
--- a/mbbsd/card.c
+++ b/mbbsd/card.c
@@ -488,10 +488,15 @@ card_ask(void)
char buf[100], buf2[3];
move(21, 0); clrtoeol();
- outs("<若想離開請輸入 q>");
+ outs("< 若想離開請輸入 q >");
snprintf(buf, sizeof(buf), "[ %s ]您現在共有 %d 枚籌碼,還要加牌嗎? [y/N/q]: ",
cuser.userid, card_get_money());
getdata(20, 0, buf, buf2, sizeof(buf2), LCECHO);
+
+ // peek one more byte
+ if (buf2[0] == ' ')
+ buf2[0] = buf2[1];
+
if (buf2[0] == 'y' || buf2[0] == 'Y')
return 1;
if (buf2[0] == 'q' || buf2[0] == 'Q')