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
commit2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f (patch)
tree6ea6c861cc7fd1aae23edee9a0cc52dd28204e36
parent2f9f7c58c8ca788f7bfaff72b53d387678d45608 (diff)
downloadpttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.tar
pttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.tar.gz
pttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.tar.bz2
pttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.tar.lz
pttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.tar.xz
pttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.tar.zst
pttbbs-2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f.zip
check if fav brd is deleted
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@767 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/board.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index b6c107c7..46eb27f2 100644
--- a/mbbsd/board.c
+++ b/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);