diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-30 11:43:55 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-30 11:43:55 +0800 |
commit | d3d1c8bfc3510358bd6fd06b5a907f319b41378f (patch) | |
tree | 03b4b84cc2e373114c02fc701094dd3a033c627e /util/util_cache.c | |
parent | e159045431ec6064260ef99db3152d9d98f70afa (diff) | |
download | pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.tar pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.tar.gz pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.tar.bz2 pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.tar.lz pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.tar.xz pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.tar.zst pttbbs-d3d1c8bfc3510358bd6fd06b5a907f319b41378f.zip |
fix bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@386 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/util_cache.c')
-rw-r--r-- | util/util_cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/util_cache.c b/util/util_cache.c index 3adb5e61..e99f52ea 100644 --- a/util/util_cache.c +++ b/util/util_cache.c @@ -1,4 +1,4 @@ -/* $Id: util_cache.c,v 1.6 2002/06/29 14:42:14 ptt Exp $ */ +/* $Id: util_cache.c,v 1.7 2002/06/30 03:43:55 ptt Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -307,7 +307,7 @@ userinfo_t *search_ulist(int uid) { /*-------------------------------------------------------*/ /* .BOARDS cache */ /*-------------------------------------------------------*/ -char *fn_board=FN_BOARD; +char *fn_board=BBSHOME"/"FN_BOARD; boardheader_t *bcache; static void reload_bcache() { @@ -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-1].brdname)) - memcpy(&bcache[bid-1],&bh, sizeof(boardheader_t)); + if(bh.brdname[0] && !strcmp(bh.brdname,bcache[bid].brdname)) + memcpy(&bcache[bid],&bh, sizeof(boardheader_t)); } SHM->Bbusystate = 0; } |