summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/toplazyBM.c4
-rw-r--r--util/util_cache.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/util/toplazyBM.c b/util/toplazyBM.c
index 5a23abcb..cf277ef8 100644
--- a/util/toplazyBM.c
+++ b/util/toplazyBM.c
@@ -1,4 +1,4 @@
-/* $Id: toplazyBM.c,v 1.8 2002/06/29 14:39:09 ptt Exp $ */
+/* $Id: toplazyBM.c,v 1.9 2002/06/29 14:42:14 ptt Exp $ */
#include "bbs.h"
@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
char *p, bmbuf[IDLEN * 3 + 3];
int index = 0, flag = 0, k, n;
p=strtok(allbrd[i].BM,"/ ");
- if(p)
+ if(p && p[0])
do
{
if(allbrd[i].brdname[0] == '\0') continue;
diff --git a/util/util_cache.c b/util/util_cache.c
index 4cf0ff1f..3adb5e61 100644
--- a/util/util_cache.c
+++ b/util/util_cache.c
@@ -1,4 +1,4 @@
-/* $Id: util_cache.c,v 1.5 2002/06/29 13:50:46 ptt Exp $ */
+/* $Id: util_cache.c,v 1.6 2002/06/29 14:42:14 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -348,8 +348,8 @@ void reset_board(int bid)
lseek(fd, (off_t)(bid * sizeof(boardheader_t)), SEEK_SET);
read(fd, &bh , sizeof(boardheader_t));
close(fd);
- if(bh.brdname[0] && !strcmp(bh.brdname,bcache[bid].brdname))
- memcpy(&bcache[bid],&bh, sizeof(boardheader_t));
+ if(bh.brdname[0] && !strcmp(bh.brdname,bcache[bid-1].brdname))
+ memcpy(&bcache[bid-1],&bh, sizeof(boardheader_t));
}
SHM->Bbusystate = 0;
}