summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-29 16:41:37 -0400
committerJules Laplace <jules@okfoc.us>2015-04-29 16:41:37 -0400
commitddaf54d3fafac65c42a6949f070dbc4222483d9b (patch)
tree7c628e904a684930a37f5fe435a65194d1ef0022
parentd24f166d20d093335c25a0f4d99f51555bbd2439 (diff)
isNaN check
-rw-r--r--js/lex.js2
1 files changed, 1 insertions, 1 deletions
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 {