summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-26 12:14:17 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-26 12:14:17 +0800
commit35dba03131d5d7c8bcda67566bb1a8e8dfceffc2 (patch)
treef8e52e0680455914c23c83791340803c4c47dc04 /util
parentf4a2cd7df6027651042667c5e330f2e922b0c9f9 (diff)
downloadpttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.tar
pttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.tar.gz
pttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.tar.bz2
pttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.tar.lz
pttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.tar.xz
pttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.tar.zst
pttbbs-35dba03131d5d7c8bcda67566bb1a8e8dfceffc2.zip
fix bug
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2555 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/boardlist.c6
1 files 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) &&