From 4654a3c8e9e2eff62c293117ae8ae5b38cb9c735 Mon Sep 17 00:00:00 2001 From: ptt Date: Thu, 22 Apr 2004 22:45:07 +0000 Subject: seg fault of board.c git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1817 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mbbsd/board.c b/mbbsd/board.c index 29d5a299..3765c854 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -283,8 +283,8 @@ load_boards(char *key) int childcount = bptr->childcount; nbrd = (boardstat_t *) malloc((childcount+2) * sizeof(boardstat_t)); // 預留兩個以免大量開版時掛調 - for (bptr = bptr->firstchild[type], brdnum=0; bptr != NULL && - brdnum < childcount+2; bptr = bptr->next[type], brdnum++) { + for (bptr = bptr->firstchild[type]; bptr != NULL && + brdnum < childcount+2; bptr = bptr->next[type]) { n = getbid(bptr); state = HasPerm(bptr); if ( !(state || GROUPOP()) || TITLE_MATCH(bptr, key) ) -- cgit v1.2.3