diff options
Diffstat (limited to 'mbbsd/gamble.c')
-rw-r--r-- | mbbsd/gamble.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index 4e2f348f..53e076ad 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -17,7 +17,7 @@ load_ticket_record(char *direct, int ticket[]) snprintf(buf, sizeof(buf), "%s/" FN_TICKET_RECORD, direct); if (!(fp = fopen(buf, "r"))) return 0; - for (i = 0; i < MAX_ITEM && fscanf(fp, "%9d ", &ticket[i]); i++) + for (i = 0; i < MAX_ITEM && fscanf(fp, "%9d ", &ticket[i])==1; i++) total = total + ticket[i]; fclose(fp); return total; |