summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-22 20:53:12 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-22 20:53:12 +0800
commitb84f597ee5c156f741dd3aabfc8b18e0f997e684 (patch)
tree79870a9706103e821d697d34ce77c14b13252e53 /mbbsd/bbs.c
parent21295b3ae2d324312c343898db97f53b989d48b4 (diff)
downloadpttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.tar
pttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.tar.gz
pttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.tar.bz2
pttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.tar.lz
pttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.tar.xz
pttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.tar.zst
pttbbs-b84f597ee5c156f741dd3aabfc8b18e0f997e684.zip
fix malfunction of '[', ']', '=' keys on article with long title
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2207 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 1c7fd538..b98070d5 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -195,8 +195,9 @@ readdoent(int num, fileheader_t * ent)
else
color = '3', mark = "R:";
- if (title[45]) /* 把多餘的 string 砍掉 */
- strlcpy(title + 42, " …", sizeof(title) - 42);
+ /* 把多餘的 string 砍掉 */
+ if (title[45])
+ strlcpy(title + PROPER_TITLE_LEN, " …", sizeof(title) - PROPER_TITLE_LEN);
if (!strncmp(title, "[公告]", 6))
special = 1;