summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-03 12:24:33 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-03 12:24:33 +0800
commit38761a4f0fdb76c9bcf405ad09e3a703eed8663c (patch)
tree44077f2e3d60d3c5a2da525bdfdca557f91b4721
parent08009fbf6f58efc85671edf7baf4bd70a3e63095 (diff)
downloadpttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.tar
pttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.tar.gz
pttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.tar.bz2
pttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.tar.lz
pttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.tar.xz
pttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.tar.zst
pttbbs-38761a4f0fdb76c9bcf405ad09e3a703eed8663c.zip
check if fav brd is deleted
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@767 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/board.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c
index b6c107c7..46eb27f2 100644
--- a/pttbbs/mbbsd/board.c
+++ b/pttbbs/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.118 2003/04/02 08:07:47 victor Exp $ */
+/* $Id: board.c,v 1.119 2003/04/03 04:24:33 victor Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -470,16 +470,17 @@ void load_brdbuf(void)
}
}
else{
- short nDatas;
- char nLines;
- read(fd, &nDatas, sizeof(nDatas));
- read(fd, &nLines, sizeof(nLines));
+ short i;
+ read(fd, &fav->nDatas, sizeof(fav->nDatas));
+ read(fd, &fav->nLines, sizeof(fav->nLines));
fav = (fav_t *)malloc(sizeof(fav_t) +
- sizeof(fav_board_t) * (nDatas + 16));
- fav->nDatas = nDatas;
- fav->nAllocs = nDatas + 16;
- fav->nLines = nLines;
- read(fd, fav->b, sizeof(fav_board_t) * nDatas);
+ sizeof(fav_board_t) * (fav->nDatas + 16));
+ fav->nAllocs = fav->nDatas + 16;
+ read(fd, fav->b, sizeof(fav_board_t) * fav->nDatas);
+ for(i = 0; i < fav->nDatas; i++){
+ if( !(fav->b[i].attr & BRD_LINE) && !bcache[fav->b[i].bid - 1].brdname[0])
+ fav->b[i].attr ^= BRD_FAV;
+ }
close(fd);
}
updatenewfav(1);