From a1cae408724ce87a11f530b5cd5adaae22959893 Mon Sep 17 00:00:00 2001 From: kcwu Date: Fri, 15 Apr 2005 14:51:23 +0000 Subject: array index off by 1 bug git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2694 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 256868ce..5ed39f8f 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -262,7 +262,7 @@ whereami(int ent, const fileheader_t * fhdr, const char *direct) bh = getbcache(currutmp->brc_id); root = getbcache(1); p[0] = bh; - for (i = 0; i < WHEREAMI_LEVEL && p[i]->parent>1; i++) + for (i = 0; i+1 < WHEREAMI_LEVEL && p[i]->parent>1; i++) p[i + 1] = getbcache(p[i]->parent); j = i; prints("§Ú¦b­þ?\n%-40.40s %.13s\n", p[j]->title + 7, p[j]->BM); -- cgit v1.2.3