summaryrefslogtreecommitdiffstats
path: root/mbbsd/gamble.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-01 01:04:41 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-01 01:04:41 +0800
commitb65230cdce248ef4fb3ceae899484bfeadf916f1 (patch)
tree5f95ef492c69dd86020e167e0bf56aa6347b3370 /mbbsd/gamble.c
parenta2834d7c52ba401accfcee956a5d7934448588a8 (diff)
downloadpttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.tar
pttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.tar.gz
pttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.tar.bz2
pttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.tar.lz
pttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.tar.xz
pttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.tar.zst
pttbbs-b65230cdce248ef4fb3ceae899484bfeadf916f1.zip
buffer size
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1283 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/gamble.c')
-rw-r--r--mbbsd/gamble.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c
index 53e076ad..ead8c124 100644
--- a/mbbsd/gamble.c
+++ b/mbbsd/gamble.c
@@ -246,8 +246,8 @@ openticket(int bid)
setbfile(outcome, bh->brdname, FN_TICKET_OUTCOME);
if ((fp = fopen(outcome, "w"))) {
fprintf(fp, "½ä½L»¡©ú\n");
- while (fgets(buf, 256, fp1)) {
- buf[255] = 0;
+ while (fgets(buf, sizeof(buf), fp1)) {
+ buf[sizeof(buf)-1] = 0;
fprintf(fp, "%s", buf);
}
fprintf(fp, "¤Uª`±¡ªp\n");