summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-22 22:39:55 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-22 22:39:55 +0800
commit5a089dda120b8944a5503ca03eaf78ceb2047853 (patch)
treefe9d125bc2d8276fc3677654544a7f9c39a7b6c3
parent76b867082deb7b2c27d35393bfe438767caa61d0 (diff)
downloadpttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.tar
pttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.tar.gz
pttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.tar.bz2
pttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.tar.lz
pttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.tar.xz
pttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.tar.zst
pttbbs-5a089dda120b8944a5503ca03eaf78ceb2047853.zip
fix "recbase bug"
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@957 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/read.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index fdf8183e..1c7aeb16 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.21 2003/04/14 15:23:07 victor Exp $ */
+/* $Id: read.c,v 1.22 2003/06/22 14:39:55 in2 Exp $ */
#include "bbs.h"
static fileheader_t *headers = NULL;
@@ -839,15 +839,16 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey
else if (recbase != locmem->top_ln) {
recbase = locmem->top_ln;
if (recbase > last_line) {
- recbase = (last_line - p_lines) >> 1;
+ recbase = last_line - p_lines + 1;
if (recbase < 1)
recbase = 1;
locmem->top_ln = recbase;
}
- if (bidcache > 0 && !(currmode & (MODE_SELECT | MODE_DIGEST))
- && (last_line - recbase) < DIRCACHESIZE)
- entries = get_fileheader_cache(currbid, currdirect, headers,
- recbase, p_lines);
+ if( bidcache > 0 &&
+ !(currmode & (MODE_SELECT | MODE_DIGEST)
+ && (last_line - recbase) < DIRCACHESIZE) )
+ entries = get_fileheader_cache(currbid, currdirect,
+ headers, recbase, p_lines);
else
entries = get_records(currdirect, headers, FHSZ, recbase,
p_lines);