diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-04-01 00:05:47 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-04-01 00:05:47 +0800 |
commit | bac189b06cd1a3357480d0039d1b6965be89ea1d (patch) | |
tree | 17640a4cc9cf9e2f89918a27d350fd3b55d2002d /mbbsd | |
parent | 054012ce93e556ce2f3f22a563e2f6749671d791 (diff) | |
download | pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.tar pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.tar.gz pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.tar.bz2 pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.tar.lz pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.tar.xz pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.tar.zst pttbbs-bac189b06cd1a3357480d0039d1b6965be89ea1d.zip |
fix little error
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@757 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index eca597ff..b77f11f9 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.116 2003/03/31 10:29:24 victor Exp $ */ +/* $Id: board.c,v 1.117 2003/03/31 16:05:47 victor Exp $ */ #include "bbs.h" #define BRC_STRLEN 15 /* Length of board name */ #define BRC_MAXSIZE 24576 @@ -406,7 +406,7 @@ void updatenewfav(int mode) brd = (char *)malloc((numboards + 1) * sizeof(char)); read(fd, brd, (numboards + 1) * sizeof(char)); - for(i = 0; i < numboards && brd[i] != BRD_END; i++){ + for(i = 0; i < numboards + 1 && brd[i] != BRD_END; i++){ if(brd[i] == BRD_NEW){ if(bcache[i].brdname[0] && Ben_Perm(&bcache[i])){ // check the permission if the board exsits if(mode) @@ -414,8 +414,12 @@ void updatenewfav(int mode) brd[i] = BRD_OLD; } } + else{ + if(!bcache[i].brdname[0]) + brd[i] = BRD_NEW; + } } - if( i != numboards ) // the board number may change + if( i < numboards + 1) // the board number may change for(i-- ; i < numboards; i++){ if(bcache[i].brdname[0] && Ben_Perm(&bcache[i])){ if(mode) |