From 35dba03131d5d7c8bcda67566bb1a8e8dfceffc2 Mon Sep 17 00:00:00 2001 From: in2 Date: Sat, 26 Feb 2005 04:14:17 +0000 Subject: fix bug git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2555 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/boardlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/boardlist.c b/util/boardlist.c index eae2d8ae..e530ecfb 100644 --- a/util/boardlist.c +++ b/util/boardlist.c @@ -66,7 +66,7 @@ void dumpdetail(void) bptr->brdname[k]); smallbrdname[k] = 0; - bid = bptr - bcache; + bid = bptr - bcache + 1; printf("$db{'tobid.%s'} = %d;\n", bptr->brdname, bid); printf("$db{'tobrdname.%d'} = '%s';\n", bid, bptr->brdname); printf("$db{'look.%s'} = '%s';\n", smallbrdname, bptr->brdname); @@ -91,7 +91,7 @@ void dumpclass(int gid) if (bptr->firstchild[0] == 0 || bptr->childcount <= 0) load_uidofgid(gid, 0); printf("$db{'class.%d'} = $serializer->serialize([", gid); - for (bid = bptr->firstchild[0]>0; bid >0 ; bid =bptr->next[0]) { + for( bid = bptr->firstchild[0] ; bid > 0 ; bid = bptr->next[0] ) { bptr = getbcache(bid); if( (bptr->brdattr & (BRD_HIDE | BRD_TOP)) || (bptr->level && !(bptr->brdattr & BRD_POSTMASK) && @@ -104,7 +104,7 @@ void dumpclass(int gid) printf("]);\n"); bptr = getbcache(gid); - for (bid = bptr->firstchild[0]>0; bid >0 ; bid =bptr->next[0]) { + for( bid = bptr->firstchild[0] ; bid > 0 ; bid = bptr->next[0] ) { bptr = getbcache(bid); if( (bptr->brdattr & (BRD_HIDE | BRD_TOP)) || (bptr->level && !(bptr->brdattr & BRD_POSTMASK) && -- cgit v1.2.3