From 9e8814a3299a9a6071aa10b5931cbd5fda810ff9 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Mon, 18 Feb 2013 18:12:15 +0000 Subject: [PATCH] Fix off-by-one error when handling bg colours. --- client/assets/dev/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/assets/dev/utils.js b/client/assets/dev/utils.js index 775073f..e45a9aa 100644 --- a/client/assets/dev/utils.js +++ b/client/assets/dev/utils.js @@ -371,7 +371,7 @@ function formatIRCMsg (msg) { //console.log(i, to); fg = col(match[1]); bg = col(match[3]); - str = msg.substring(i + 1 + match[1].length + ((bg !== null) ? match[2].length + 1 : 0), to); + str = msg.substring(i + 1 + match[1].length + ((bg !== null) ? match[2].length : 0), to); //console.log(str); replace += '' + str + ''; i = to; -- 2.25.1