From fe06fc85d3324b13518c8d44977dcd5ac19f9bbf Mon Sep 17 00:00:00 2001 From: Cheng Liangyu Date: Mon, 1 Dec 2014 13:16:44 +0800 Subject: fix base54 --- lib/scope.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/scope.js b/lib/scope.js index 6f29921f..d252d535 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -471,7 +471,9 @@ var base54 = (function() { base54.freq = function(){ return frequency }; function base54(num) { var ret = "", base = 54; + num++; do { + num--; ret += String.fromCharCode(chars[num % base]); num = Math.floor(num / base); base = 64; -- cgit v1.2.3