diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-29 22:42:14 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-29 22:42:14 +0800 |
commit | cc8039cccc2c5f3b35530b739db9c09245763b83 (patch) | |
tree | f004531cee38d1d002a39068cad04bbcf30c4fc4 /util | |
parent | 85e01e834a4ece2064829e4c7ce27c9346cfbb5a (diff) | |
download | pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.tar pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.tar.gz pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.tar.bz2 pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.tar.lz pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.tar.xz pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.tar.zst pttbbs-cc8039cccc2c5f3b35530b739db9c09245763b83.zip |
bid errpr
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@380 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/toplazyBM.c | 4 | ||||
-rw-r--r-- | util/util_cache.c | 6 |
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; } |