summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-05-12 00:23:06 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-05-12 00:23:06 +0800
commit6156972e24406aeec6399500bb1f2fe7f45008f9 (patch)
treed98060c5078b34c5d733259de6c8a4c0d36fea36
parent3cb3a5bb23def722b493a54673e02f242b944b6c (diff)
downloadpttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.tar
pttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.tar.gz
pttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.tar.bz2
pttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.tar.lz
pttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.tar.xz
pttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.tar.zst
pttbbs-6156972e24406aeec6399500bb1f2fe7f45008f9.zip
Prevent multiple holidays in same day. #1HZcxXj1 (PttBug) [ptt.cc]
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5843 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/util/account.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pttbbs/util/account.c b/pttbbs/util/account.c
index 2e69642a..70fb627b 100644
--- a/pttbbs/util/account.c
+++ b/pttbbs/util/account.c
@@ -286,6 +286,7 @@ update_holiday_list(struct tm *ptime)
if (ptime->tm_mday == da && ptime->tm_mon + 1 == mo) {
i = 1;
fprintf(fp1, "%-14.14s", &buf[6]);
+ break;
}
} else if (a - '0' <= 4) {
int wday = 0;
@@ -296,6 +297,7 @@ update_holiday_list(struct tm *ptime)
(ptime->tm_mday - 1) / 7 + 1 == (a - '0')) {
i = 1;
fprintf(fp1, "%-14.14s", &buf[6]);
+ break;
}
}
}