diff options
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r-- | mbbsd/board.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 420f3f60..ab7fc4b7 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1085,20 +1085,22 @@ choose_board(int newflag) if (bname[0] && (bid = getbnum(bname)) && HasPerm(getbcache(bid))) { - fav_type_t * ptr = fav_add_board(bid); - - if (ptr == NULL) - vmsg("你的最愛太多了啦 真花心"); - else if (ptr->attr & NBRD_FAV) { // already in fav list + fav_type_t * ptr = getboard(bid); + if (ptr != NULL) { // already in fav list // move curser to item for (num = 0; bid != nbrd[num].bid; ++num); } else { - ptr->attr |= NBRD_FAV; + ptr = fav_add_board(bid); + + if (ptr == NULL) + vmsg("你的最愛太多了啦 真花心"); + else { + ptr->attr |= NBRD_FAV; - if (ch == 'i') { - move_in_current_folder(brdnum, num); - } else { - num = brdnum; + if (ch == 'i') + move_in_current_folder(brdnum, num); + else + num = brdnum; } } } |