diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-05 17:16:06 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-05 17:16:06 +0800 |
commit | 9b691d3d21047d1121ab62994e124385359bbdaa (patch) | |
tree | 75384d20833d938c80fbf8d37708aace98f2d120 | |
parent | 50a91ac9fcb6ffa78377e8fb81adb65e7c3a91c7 (diff) | |
download | pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.tar pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.tar.gz pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.tar.bz2 pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.tar.lz pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.tar.xz pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.tar.zst pttbbs-9b691d3d21047d1121ab62994e124385359bbdaa.zip |
Fix currboard usage when crosspost.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1697 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 7 | ||||
-rw-r--r-- | mbbsd/mail.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 0960080e..be55fa57 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1084,6 +1084,7 @@ cross_post(int ent, fileheader_t * fhdr, char *direct) getdata(2, 0, "(S)存檔 (L)站內 (Q)取消?[Q] ", genbuf, 3, LCECHO); if (genbuf[0] == 'l' || genbuf[0] == 's') { int currmode0 = currmode; + char *save_currboard; currmode = 0; setbpath(xfpath, xboard); @@ -1100,10 +1101,10 @@ cross_post(int ent, fileheader_t * fhdr, char *direct) xptr = fopen(xfpath, "w"); strlcpy(save_title, xfile.title, sizeof(save_title)); - strlcpy(xfpath, currboard, sizeof(xfpath)); - strlcpy(currboard, xboard, sizeof(currboard)); + save_currboard = currboard; + currboard = xboard; write_header(xptr); - strlcpy(currboard, xfpath, sizeof(currboard)); + currboard = save_currboard; fprintf(xptr, "※ [本文轉錄自 %s 看板]\n\n", currboard); diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 60f52e2b..ff4583ea 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1153,14 +1153,15 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct) } setuserfile(fname, fhdr->filename); if (ent) { + char *save_currboard; xptr = fopen(xfpath, "w"); assert(xptr); strlcpy(save_title, xfile.title, sizeof(save_title)); - strlcpy(xfpath, currboard, sizeof(xfpath)); - strlcpy(currboard, xboard, sizeof(currboard)); + save_currboard = currboard; + currboard = xboard; write_header(xptr); - strlcpy(currboard, xfpath, sizeof(currboard)); + currboard = save_currboard; fprintf(xptr, "※ [本文轉錄自 %s 信箱]\n\n", cuser->userid); |