From dd8c2381489a259e60ec0d49aba233f53e7a24fe Mon Sep 17 00:00:00 2001 From: wens Date: Tue, 5 Aug 2008 06:17:45 +0000 Subject: Support tagging of multiple files with same chrono git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4394 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/read.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/read.c b/mbbsd/read.c index 341e2320..8e15c51a 100644 --- a/mbbsd/read.c +++ b/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; -- cgit v1.2.3