From 78a627df27bebb0941ee4d42486f3dd18f59854a Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Tue, 19 Jul 2016 02:54:52 -0700 Subject: [PATCH] Fix a int 0 bug in green length of block --- threads.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/threads.js b/threads.js index ef95c381..d8f9663d 100644 --- a/threads.js +++ b/threads.js @@ -2407,7 +2407,7 @@ Process.prototype.reportLetter = function (idx, string) { return ''; } var i = +(idx || 0), - str = (string || '').toString(); + str = isNil(string) ? '' : string.toString(); return str[i - 1] || ''; }; @@ -2416,7 +2416,7 @@ Process.prototype.reportStringSize = function (data) { return data.length(); } - return (isNil(data) ? '' : data).toString().length; + return isNil(data) ? 0 : data.toString().length; }; Process.prototype.reportUnicode = function (string) {