projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c2d8d0
)
Fix off-by-one error when handling bg colours.
author
Jack Allnutt
<m2ys4u@gmail.com>
Mon, 18 Feb 2013 18:12:15 +0000
(18:12 +0000)
committer
Jack Allnutt
<m2ys4u@gmail.com>
Mon, 18 Feb 2013 18:12:15 +0000
(18:12 +0000)
client/assets/dev/utils.js
patch
|
blob
|
blame
|
history
diff --git
a/client/assets/dev/utils.js
b/client/assets/dev/utils.js
index 775073fe754995cf20a4e481c43a8cb45c1a063b..e45a9aa29164dbe1a34db098006d3bdb02594bd0 100644
(file)
--- 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 += '<span style="' + ((fg !== null) ? 'color: ' + fg + '; ' : '') + ((bg !== null) ? 'background-color: ' + bg + ';' : '') + '">' + str + '</span>';
i = to;