summaryrefslogtreecommitdiffstats
path: root/mbbsd/dark.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/dark.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/dark.c')
-rw-r--r--mbbsd/dark.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mbbsd/dark.c b/mbbsd/dark.c
index cd37fd0b..4c9c6486 100644
--- a/mbbsd/dark.c
+++ b/mbbsd/dark.c
@@ -1,4 +1,4 @@
-/* $Id: dark.c,v 1.7 2002/07/21 09:26:02 in2 Exp $ */
+/* $Id: dark.c,v 1.8 2002/07/22 19:02:00 in2 Exp $ */
#include "bbs.h"
#define RED 1
@@ -156,14 +156,14 @@ draw_line(sint y, sint f)
strlcpy(buf, "\033[43;30m", sizeof(buf));
for (i = 0; i < 8; i++) {
if (brd[y][i].die == 1)
- sprintf(tmp, "¢x ");
+ snprintf(tmp, sizeof(tmp), "¢x ");
else if (brd[y][i].out == 0)
- sprintf(tmp, "¢x¡´");
+ snprintf(tmp, sizeof(tmp), "¢x¡´");
else {
- sprintf(tmp, "¢x\033[%s1;%dm%s\033[m\033[43;30m",
- (f == i) ? "1;47;" : "", (brd[y][i].color) ? 31 : 34,
- (brd[y][i].color) ? rname[brd[y][i].value] :
- bname[brd[y][i].value]);
+ snprintf(tmp, sizeof(tmp), "¢x\033[%s1;%dm%s\033[m\033[43;30m",
+ (f == i) ? "1;47;" : "", (brd[y][i].color) ? 31 : 34,
+ (brd[y][i].color) ? rname[brd[y][i].value] :
+ bname[brd[y][i].value]);
}
strcat(buf, tmp);
}