summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobertabcd <robertabcd@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-09-24 19:11:52 +0800
committerrobertabcd <robertabcd@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-09-24 19:11:52 +0800
commit5b031370eb823ec0beb2c9addd63d36815a2e1b3 (patch)
treeb04bb7771c34d23100624c331740a1e62f9bbe46
parent547b65f1a36e9fe163a41d600477d9c964ab3042 (diff)
downloadpttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.tar
pttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.tar.gz
pttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.tar.bz2
pttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.tar.lz
pttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.tar.xz
pttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.tar.zst
pttbbs-5b031370eb823ec0beb2c9addd63d36815a2e1b3.zip
Make boardd discard incomplete DBCS char in article title.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5879 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/daemon/boardd/boardd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pttbbs/daemon/boardd/boardd.c b/pttbbs/daemon/boardd/boardd.c
index c372e962..2e6232d3 100644
--- a/pttbbs/daemon/boardd/boardd.c
+++ b/pttbbs/daemon/boardd/boardd.c
@@ -58,6 +58,8 @@ article_list(struct evbuffer *buf, boardheader_t *bptr, int offset, int length)
if (get_records_keep(path, &fhdr, sizeof(fhdr), ++offset, 1, &fd) <= 0)
break;
+ DBCS_safe_trim(fhdr.title);
+
evbuffer_add_printf(buf, "%d,%s,%s,%d,%d,%s,%s\n",
offset, fhdr.filename, fhdr.date, fhdr.recommend,
fhdr.filemode, fhdr.owner, fhdr.title);