summaryrefslogtreecommitdiffstats
path: root/mbbsd/card.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-23 03:02:01 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-23 03:02:01 +0800
commit8b45fd166b943e17dabb3f5cdf972baeb58e0346 (patch)
tree7b2e5bf09b7c9fd812d0ae7cacdfa049c4dc1e07 /mbbsd/card.c
parenta1bd04d7decea39d51bbc06b50755976d4184c50 (diff)
downloadpttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar
pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.gz
pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.bz2
pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.lz
pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.xz
pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.zst
pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.zip
sprintf() -> snprintf()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@435 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/card.c')
-rw-r--r--mbbsd/card.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/card.c b/mbbsd/card.c
index 1c457046..55102df5 100644
--- a/mbbsd/card.c
+++ b/mbbsd/card.c
@@ -1,4 +1,4 @@
-/* $Id: card.c,v 1.5 2002/07/21 09:26:02 in2 Exp $ */
+/* $Id: card.c,v 1.6 2002/07/22 19:02:00 in2 Exp $ */
#include "bbs.h"
static int
@@ -372,8 +372,9 @@ card_double_ask()
{
char buf[100], buf2[3];
- sprintf(buf, "[ %s ]您現在共有 %d P幣, 現在要分組(加收 %d 元)嗎? [y/N]",
- cuser.userid, cuser.money, JACK);
+ snprintf(buf, sizeof(buf),
+ "[ %s ]您現在共有 %d P幣, 現在要分組(加收 %d 元)嗎? [y/N]",
+ cuser.userid, cuser.money, JACK);
reload_money();
if (cuser.money < JACK)
return 0;
@@ -388,7 +389,7 @@ card_ask()
{
char buf[100], buf2[3];
- sprintf(buf, "[ %s ]您現在共有 %d P幣, 還要加牌嗎? [y/N]",
+ snprintf(buf, sizeof(buf), "[ %s ]您現在共有 %d P幣, 還要加牌嗎? [y/N]",
cuser.userid, cuser.money);
getdata(20, 0, buf, buf2, sizeof(buf2), LCECHO);
if (buf2[0] == 'y' || buf2[0] == 'Y')