From ddaf54d3fafac65c42a6949f070dbc4222483d9b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 29 Apr 2015 16:41:37 -0400 Subject: isNaN check --- js/lex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/lex.js b/js/lex.js index eb58753..641fd2e 100644 --- a/js/lex.js +++ b/js/lex.js @@ -44,7 +44,7 @@ Lex.prototype.mirc = function(){ if (fgOnly) { return "\x03" + (this.fg&15) + char } - if ((this.bg&15) < 10 && parseInt(char)) { + if ((this.bg&15) < 10 && ! isNaN(parseInt(char))) { return "\x03" + (this.fg&15) + ",0" + (this.bg&15) + char } else { -- cgit v1.2.3-70-g09d2