summaryrefslogtreecommitdiff
path: root/src/fe-common/core/formats.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-22 08:35:53 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-22 08:35:53 +0000
commit62a7faf5b2cabc4b2c225555df0b88eafc9528e4 (patch)
tree67f68c52b9a257f446089719b93199bc2bf17af7 /src/fe-common/core/formats.c
parentfc17069cec434306599582a381ea1d61d8cea4ad (diff)
downloadirssi-62a7faf5b2cabc4b2c225555df0b88eafc9528e4.zip
strip_real_length(): initialize last_color_pos and last_color_len to
-1. Word hilighting crashed if there was no colors set in the line.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1282 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/formats.c')
-rw-r--r--src/fe-common/core/formats.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c
index 7faf3d2a..2ef4aad1 100644
--- a/src/fe-common/core/formats.c
+++ b/src/fe-common/core/formats.c
@@ -630,6 +630,11 @@ int strip_real_length(const char *str, int len,
{
const char *start = str;
+ if (last_color_pos != NULL)
+ *last_color_pos = -1;
+ if (last_color_len != NULL)
+ *last_color_len = -1;
+
while (*str != '\0') {
if (*str == 3) {
const char *mircstart = str;