summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-10-17 01:08:50 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-10-17 01:08:50 +0800
commitf2650f5fce0362df7e48c10830e5258c9778502a (patch)
tree436d5e8909ab6427575b3314673c8b11c255e6c2 /mbbsd/board.c
parent7daae7397382c30de7a7851ffa1ded14969b1f76 (diff)
downloadpttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.tar
pttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.tar.gz
pttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.tar.bz2
pttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.tar.lz
pttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.tar.xz
pttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.tar.zst
pttbbs-f2650f5fce0362df7e48c10830e5258c9778502a.zip
* save memory, NameList is more like STL's vector now
* fix corner case of fav bug * code revise git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3585 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 1aedfd6f..90482d17 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -353,6 +353,8 @@ load_boards(char *key)
state |= NBRD_TAG;
if (is_set_attr(&fav->favh[i], FAVH_ADM_TAG))
state |= NBRD_TAG;
+ if (fav_getid(&fav->favh[i]) < 1)
+ continue;
addnewbrdstat(fav_getid(&fav->favh[i]) - 1, NBRD_FAV | state);
}
}
@@ -441,7 +443,6 @@ load_boards(char *key)
}
if(childcount < brdnum) {
//Ptt: dirty fix fix soon
- fprintf(stderr, "childcount < brdnum, %d<%d, class_bid=%d\n",childcount,brdnum,class_bid);
getbcache(class_bid)->childcount = 0;
}
@@ -460,6 +461,7 @@ search_board(void)
clrtoeol();
NameList_init(&namelist);
assert(brdnum<=nbrdsize);
+ NameList_resizefor(&namelist, brdnum);
for (num = 0; num < brdnum; num++)
if (!IS_LISTING_FAV() ||
(nbrd[num].myattr & NBRD_BOARD && HasBoardPerm(B_BH(&nbrd[num]))) )