summaryrefslogtreecommitdiffstats
path: root/mbbsd/screen.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-08-31 11:34:32 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-08-31 11:34:32 +0800
commitfe49c3a76b174403c43cca4420ff450dab47c293 (patch)
tree28c7dec689fada9b48803bf6d19846f2b02280ff /mbbsd/screen.c
parente52b78c90c2dd62fdae8a8c538d6fa7f4eb259c1 (diff)
downloadpttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.tar
pttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.tar.gz
pttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.tar.bz2
pttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.tar.lz
pttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.tar.xz
pttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.tar.zst
pttbbs-fe49c3a76b174403c43cca4420ff450dab47c293.zip
* fix getyx_ansi calculation (however, getdata/vgets is still not able to display ANSI code in prompt string correctly with ordinal screen.c)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4804 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r--mbbsd/screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 5537a4f3..23d00c20 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -160,7 +160,8 @@ getyx_ansi(int *py, int *px)
if (slp->len < 1)
return;
c = slp->data[x];
- *px += (strlen((char*)slp->data) - strlen_noansi((char*)slp->data));
+ slp->data[x] = 0;
+ *px -= (strlen((char*)slp->data) - strlen_noansi((char*)slp->data));
slp->data[x] = c;
}