diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-10 22:45:10 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-10 22:45:10 +0800 |
commit | 062d8871369884fc7a0e7f983a44d0aa593e5e0a (patch) | |
tree | 6b03ffc3002eb410f2c3dea3784f6b13b6be7638 /mbbsd | |
parent | a3e4ba9b6bbf132795a449c2656d7c1a5879d1cc (diff) | |
download | pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.tar pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.tar.gz pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.tar.bz2 pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.tar.lz pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.tar.xz pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.tar.zst pttbbs-062d8871369884fc7a0e7f983a44d0aa593e5e0a.zip |
Missing commit.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1480 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/io.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -375,7 +375,7 @@ strip_ansi(char *buf, char *str, int mode) /* 20 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 30 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, /* 0~9 ;= */ /* 40 */ 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, /* ABCDHIJK */ - /* 50 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, /* [ */ + /* 50 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 */ 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 0, /* fhlm */ /* 70 */ 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* su */ /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -396,18 +396,22 @@ strip_ansi(char *buf, char *str, int mode) *buf++ = *str; ++count; }else{ - register char* p = str; + register char* p = str + 1; + if( *p != '[' ){ + ++str; + continue; + } while(isEscapeParam(*++p)); if( (mode == NO_RELOAD && isEscapeCommand(*p)) || (mode == ONLY_COLOR && *p == 'm' )){ - register int len = p - str; + register int len = p - str + 1; if( buf ){ strncpy(buf, str, len); buf += len; } count += len; } - str = p - 1; + str = p; } if( buf ) *buf = 0; |