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 | f574b3f0db789e7c42c9793177f3c220d79042a9 (patch) | |
tree | f86682e7d9477bd30138dd25fc940d8be21a89e2 | |
parent | 54c0f500ce9378ac45395511a5aa6667554ee3ba (diff) | |
download | pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.tar pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.tar.gz pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.tar.bz2 pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.tar.lz pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.tar.xz pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.tar.zst pttbbs-f574b3f0db789e7c42c9793177f3c220d79042a9.zip |
fix little error
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@757 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/board.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c index eca597ff..b77f11f9 100644 --- a/pttbbs/mbbsd/board.c +++ b/pttbbs/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) |