summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-22 19:35:07 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-22 19:35:07 +0000
commitc3a6417c0f55f31928bf502638bf285e42c81337 (patch)
tree0eec3d4055816bdd5f61e9aba1a80bc573cdb083 /src
parent391a7e57104d0b88433e83f7156feb459ad3b989 (diff)
downloadirssi-c3a6417c0f55f31928bf502638bf285e42c81337.zip
strip_real_length() : bolds, underlines, etc. one character styling
left it to infinite loop git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1140 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/formats.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c
index 0b5ff76f..d0706ff6 100644
--- a/src/fe-common/core/formats.c
+++ b/src/fe-common/core/formats.c
@@ -624,9 +624,11 @@ int strip_real_length(const char *str, int len,
*last_color_len = 2;
}
str += 2;
- } else if (!IS_COLOR_CODE(*str)) {
- if (len-- == 0)
- break;
+ } else {
+ if (!IS_COLOR_CODE(*str)) {
+ if (len-- == 0)
+ break;
+ }
str++;
}
}