From b9f694e971dd74723e1cf3cd837b385c02820194 Mon Sep 17 00:00:00 2001 From: ptt Date: Tue, 9 Aug 2005 14:23:30 +0000 Subject: fix bug for class menu. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3021 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/board.c b/mbbsd/board.c index cd7aed81..287e959e 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -334,12 +334,14 @@ load_boards(char *key) #endif } else { /* load boards of a subclass */ boardheader_t *bptr = getbcache(class_bid); - int childcount = bptr->childcount; + int childcount; int bid; if (bptr->firstchild[type] == 0 ) load_uidofgid(class_bid, type); + childcount = bptr->childcount; // Ptt: child count after load_uidofgid + nbrd = (boardstat_t *) malloc((childcount+2) * sizeof(boardstat_t)); // 預留兩個以免大量開板時掛調 for (bid = bptr->firstchild[type]; bid > 0 && @@ -841,7 +843,7 @@ choose_board(int newflag) break; case 'F': case 'f': - if (IN_SUBCLASS() && HasUserPerm(PERM_SYSOP)) { + if (HasUserPerm(PERM_SYSOP)) { getbcache(class_bid)->firstchild[cuser.uflag & BRDSORT_FLAG ? 1 : 0] = 0; brdnum = -1; } -- cgit v1.2.3