summaryrefslogtreecommitdiffstats
path: root/mbbsd/gamble.c
diff options
context:
space:
mode:
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");