diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 46eb27f2..20c46d28 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.119 2003/04/03 04:24:33 victor Exp $ */ +/* $Id: board.c,v 1.120 2003/04/03 04:41:30 victor Exp $ */ #include "bbs.h" #define BRC_STRLEN 15 /* Length of board name */ #define BRC_MAXSIZE 24576 @@ -470,12 +470,15 @@ void load_brdbuf(void) } } else{ - short i; - read(fd, &fav->nDatas, sizeof(fav->nDatas)); - read(fd, &fav->nLines, sizeof(fav->nLines)); + short nDatas, i; + char nLines; + read(fd, &nDatas, sizeof(nDatas)); + read(fd, &nLines, sizeof(nLines)); fav = (fav_t *)malloc(sizeof(fav_t) + - sizeof(fav_board_t) * (fav->nDatas + 16)); - fav->nAllocs = fav->nDatas + 16; + sizeof(fav_board_t) * (nDatas + 16)); + fav->nDatas = nDatas; + fav->nAllocs = nDatas + 16; + fav->nLines = nLines; 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]) |