summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-03 12:41:30 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-03 12:41:30 +0800
commit7d57af0a6b3d9dc12c8105982a70bb24f656cb0c (patch)
treeb25028c7a3c6c5762366d391cff0fd1d8e219e8a
parent2f3a5b2f212064dd799a7c2b6d1ab5e7a193642f (diff)
downloadpttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.tar
pttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.tar.gz
pttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.tar.bz2
pttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.tar.lz
pttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.tar.xz
pttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.tar.zst
pttbbs-7d57af0a6b3d9dc12c8105982a70bb24f656cb0c.zip
fix last commit bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@768 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/board.c15
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])