diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-18 00:04:13 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-18 00:04:13 +0800 |
commit | 9bb3a096e9d6d16f40db508228e460ed67eb15ec (patch) | |
tree | 3e73a748a4ca0958e38a60e2a460de6d29f915f2 /mbbsd/edit.c | |
parent | 2403fd0fac7ace087d49155994c29d5a62bf9e8b (diff) | |
download | pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.tar pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.tar.gz pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.tar.bz2 pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.tar.lz pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.tar.xz pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.tar.zst pttbbs-9bb3a096e9d6d16f40db508228e460ed67eb15ec.zip |
curr_buf is not available when cross posting.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2408 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r-- | mbbsd/edit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 54d90cdb..69756bc2 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -965,7 +965,8 @@ write_header(FILE * fp) memset(&postlog, 0, sizeof(postlog)); strlcpy(postlog.author, cuser.userid, sizeof(postlog.author)); - curr_buf->ifuseanony = 0; + if (curr_buf) + curr_buf->ifuseanony = 0; #ifdef HAVE_ANONYMOUS if (currbrdattr & BRD_ANONYMOUS) { int defanony = (currbrdattr & BRD_DEFAULTANONYMOUS); @@ -1039,7 +1040,7 @@ addsignature(FILE * fp, int ifuseanony) ") \n◆ From: %s\n", fromhost); return; } - if (!curr_buf->ifuseanony) { + if (curr_buf && !curr_buf->ifuseanony) { num = showsignature(fpath, &i); if (num){ msg[34] = ch = isdigit(cuser.signature) ? cuser.signature : 'X'; @@ -1068,7 +1069,7 @@ addsignature(FILE * fp, int ifuseanony) } #ifdef HAVE_ORIGIN #ifdef HAVE_ANONYMOUS - if (curr_buf->ifuseanony) + if (curr_buf && curr_buf->ifuseanony) fprintf(fp, "\n--\n※ 發信站: " BBSNAME "(" MYHOSTNAME ") \n◆ From: %s\n", "暱名天使的家"); else { |