From 03c0e52dc3a6534362728cd15d7148c8485e8174 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 14 Oct 2011 08:42:24 +0000 Subject: refine topic length git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5428 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/bbs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index 7a406834..e39963df 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -1218,8 +1218,11 @@ do_general(int garbage) } while (1); do { - getdata_buf(22, 0, "¼ÐÃD¡G", tmp_title, - DISP_TTLEN + (t_columns - 80), DOECHO); + int w = DISP_TTLEN + (t_columns - 80); + // -4: for prefixes + if (w >= TTLEN - 4) + w = TTLEN - 4; + getdata_buf(22, 0, "¼ÐÃD¡G", tmp_title, w, DOECHO); strip_ansi(tmp_title, tmp_title, STRIP_ALL); if (!is_tn_allowed(tmp_title)) -- cgit v1.2.3