From 9044226d6e70fd72ec86e71b069540860855e9ae Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 31 Jan 2001 20:53:09 +0000 Subject: [PATCH] Print the color hilight with two digits so it won't accidentally use the next char if it's numeric. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1174 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/hilight-text.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 5c80bd4b..52fcb056 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -313,7 +313,10 @@ char *hilight_get_color(HILIGHT_REC *rec, int activity) color = number; } - return g_strconcat(isdigit(*color) ? "\003" : "", color, NULL); + if (is_numeric(color, 0)) + return g_strdup_printf("\003%02d", atoi(color)); + + return g_strdup(color); } static void hilight_update_text_dest(TEXT_DEST_REC *dest, HILIGHT_REC *rec)