summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-08-05 14:17:45 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-08-05 14:17:45 +0800
commit0fc1040cc3250bb08fa4519f1819557cce93963b (patch)
treed138d9972aa0253757c91f3aaf08a8db5d02ef28
parentbe01119fa2cca2db25f72efd05591c397ed0a7bc (diff)
downloadpttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.tar
pttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.tar.gz
pttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.tar.bz2
pttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.tar.lz
pttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.tar.xz
pttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.tar.zst
pttbbs-0fc1040cc3250bb08fa4519f1819557cce93963b.zip
Support tagging of multiple files with same chrono
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4394 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/read.c b/pttbbs/mbbsd/read.c
index 341e2320..8e15c51a 100644
--- a/pttbbs/mbbsd/read.c
+++ b/pttbbs/mbbsd/read.c
@@ -40,10 +40,10 @@ Tagger(time4_t chrono, int recno, int mode)
for (head = 0, tail = TagNum - 1, comp = 1; head <= tail;) {
posi = (head + tail) >> 1;
- comp = TagList[posi].chrono - chrono;
- if (!comp) {
- break;
- } else if (comp < 0) {
+ if (!(comp = TagList[posi].chrono - chrono))
+ if (!(comp = TagList[posi].recno - recno))
+ break;
+ if (comp < 0) {
head = posi + 1;
} else {
tail = posi - 1;