diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-10-14 16:42:24 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-10-14 16:42:24 +0800 |
commit | 03c0e52dc3a6534362728cd15d7148c8485e8174 (patch) | |
tree | 2c61f6d7a0c2563fbb81bc0c170589482c178e95 | |
parent | 6ca8a092219b016c1c3304761216be18f375cc82 (diff) | |
download | pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.tar pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.tar.gz pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.tar.bz2 pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.tar.lz pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.tar.xz pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.tar.zst pttbbs-03c0e52dc3a6534362728cd15d7148c8485e8174.zip |
refine topic length
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5428 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 7 |
1 files 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)) |