diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-10 22:29:46 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-10 22:29:46 +0800 |
commit | a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc (patch) | |
tree | 571460f6431e9fa14979791cd6a44204a7331809 | |
parent | e293b3daae5393bdf6a90eee2a8d1d3f6bb663bd (diff) | |
download | pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.tar pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.tar.gz pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.tar.bz2 pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.tar.lz pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.tar.xz pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.tar.zst pttbbs-a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc.zip |
Wrong caculation of ansi escape sequence length.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1479 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/io.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -400,14 +400,14 @@ strip_ansi(char *buf, char *str, int mode) while(isEscapeParam(*++p)); if( (mode == NO_RELOAD && isEscapeCommand(*p)) || (mode == ONLY_COLOR && *p == 'm' )){ - register int len = p - str + 1; + register int len = p - str; if( buf ){ strncpy(buf, str, len); buf += len; } count += len; } - str = p; + str = p - 1; } if( buf ) *buf = 0; |