summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-08-20 22:40:34 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-08-20 22:40:34 +0800
commit659cea24fd94eb9b3ad99f07062ba248ccb3e75f (patch)
treedcc8c28b29bb5279da2996576d0df32d8939d0c9 /mbbsd
parentd86a86926c64f77e075185db4211687c76c7eb71 (diff)
downloadpttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.tar
pttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.tar.gz
pttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.tar.bz2
pttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.tar.lz
pttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.tar.xz
pttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.tar.zst
pttbbs-659cea24fd94eb9b3ad99f07062ba248ccb3e75f.zip
fix last commit bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@484 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/board.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 586ef01e..ba6c50c2 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.54 2002/08/20 04:58:01 in2 Exp $ */
+/* $Id: board.c,v 1.55 2002/08/20 14:40:34 in2 Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -415,6 +415,8 @@ addnewbrdstat(int n, int state)
{
boardstat_t *ptr = &nbrd[brdnum++];
boardheader_t *bptr = &bcache[n];
+ if( brdnum >= nuseboards )
+ vmsg("memory error");
ptr->total = &(SHM->total[n]);
ptr->lastposttime = &(SHM->lastposttime[n]);
ptr->bid = n + 1;
@@ -452,7 +454,7 @@ load_boards(char *key)
if (class_bid <= 0) {
if( nuseboards == 0 ){
nuseboards = 10; /* ¦h malloc ¤Q­Óª© */
- for ( i = 0; i < numboards; i++) {
+ for (i = 0; i < numboards; i++) {
if ((bptr = SHM->bsorted[type][i]) == NULL)
continue;
n = (int)(bptr - bcache);
@@ -462,8 +464,7 @@ load_boards(char *key)
(yank_flag == 1 && !zapbuf[n]) ||
(key[0] && !strcasestr(bptr->title, key)) ||
(class_bid == -1 && bptr->nuser < 5))
- continue;
- ++nuseboards;
+ ++nuseboards;
}
}