From c3a6417c0f55f31928bf502638bf285e42c81337 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 22 Jan 2001 19:35:07 +0000 Subject: [PATCH] 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 --- src/fe-common/core/formats.c | 8 +++++--- 1 file 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++; } }