summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-06 16:06:22 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-06 16:06:22 +0800
commitfe8e0ef27f2b5c707a3f61987dd2ca58beb843ce (patch)
tree1cc83c85c845dc5eedea831ff30cf2e974f4e854 /mbbsd
parentecdf6203e40698b62611c1099bb010cdd5924924 (diff)
downloadpttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.tar
pttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.tar.gz
pttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.tar.bz2
pttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.tar.lz
pttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.tar.xz
pttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.tar.zst
pttbbs-fe8e0ef27f2b5c707a3f61987dd2ca58beb843ce.zip
bug fix: should set FILE_BOTTOM after checking, patch submitted by CatMan@ptt2. fixed #15.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2904 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 344c3c1c..cb98be8d 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2313,18 +2313,19 @@ push_bottom(int ent, fileheader_t *fhdr, const char *direct)
"取消置底公告?(y/N)":
"加入置底公告?(y/N)") != 'y' )
return READ_REDRAW;
- fhdr->filemode ^= FILE_BOTTOM;
- if(fhdr->filemode & FILE_BOTTOM ){
+ if(!(fhdr->filemode & FILE_BOTTOM) ){
sprintf(buf, "%s.bottom", direct);
if(num >= 5){
vmsg("不得超過 5 篇重要公告 請精簡!");
return READ_REDRAW;
}
+ fhdr->filemode ^= FILE_BOTTOM;
fhdr->multi.refer.flag = 1;
fhdr->multi.refer.ref = ent;
append_record(buf, fhdr, sizeof(fileheader_t));
}
else{
+ fhdr->filemode ^= FILE_BOTTOM;
num = delete_record(direct, sizeof(fileheader_t), ent);
}
setbottomtotal(currbid);