summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-30 23:36:47 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-30 23:36:47 +0800
commite33b568ac6faff6395e49aa2f31e34624de6175e (patch)
tree9dc4b475b8350392c88c6c60bead2bba2c751235 /mbbsd
parent0257cd3c79d17e6db83736cfc6679bfe50a6607b (diff)
downloadpttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.tar
pttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.tar.gz
pttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.tar.bz2
pttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.tar.lz
pttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.tar.xz
pttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.tar.zst
pttbbs-e33b568ac6faff6395e49aa2f31e34624de6175e.zip
check favline num while logging out
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@752 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/board.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 04edce42..c0e7774e 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.114 2003/03/30 03:00:10 victor Exp $ */
+/* $Id: board.c,v 1.115 2003/03/30 15:36:47 victor Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -527,10 +527,15 @@ save_brdbuf(void)
return;
#endif
- for( r = w = 0 ; r < fav->nDatas ; ++r )
+ fav->nLines = 0;
+ for( r = w = 0 ; r < fav->nDatas ; ++r ){
if( ( fav->b[r].attr & BRD_LINE ) ||
- (fav->b[r].attr & BRD_FAV && bcache[fav->b[r].bid - 1].brdname[0]))
+ (fav->b[r].attr & BRD_FAV && bcache[fav->b[r].bid - 1].brdname[0])){
fav->b[w++] = fav->b[r];
+ if(fav->b[w].attr & BRD_LINE)
+ fav->nLines--;
+ }
+ }
fav->nDatas = w;
setuserfile(fname, FAV3);
if( (fd = open(fname, O_WRONLY | O_CREAT, 0600)) != -1 ){