From 0db25e13fc53548ab531de8a3cb8e0a2e6138c01 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 15 May 2009 03:52:36 +0000 Subject: pfterm: don't use bs to optimize when there's wrap concern. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4452 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/pfterm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c index 27c27bff..caedce88 100644 --- a/mbbsd/pfterm.c +++ b/mbbsd/pfterm.c @@ -2080,7 +2080,8 @@ fterm_rawmove_opt(int y, int x) #endif // !DBG_TEXT_FD // x--: compare with FTMV_COST: ESC[m;nH costs 5-8 bytes - if (x < ft.rx && y >= ft.ry && (adx+ady) < FTMV_COST) + // in order to prevent wrap, don't use bs when rx exceed boundary (ft.cols) + if (x < ft.rx && y >= ft.ry && (adx+ady) < FTMV_COST && ft.rx < ft.cols) { while (adx > 0) fterm_rawc('\b'), adx--; -- cgit v1.2.3