aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Liangyu <clyfish@gmail.com>2014-12-01 13:16:44 +0800
committerCheng Liangyu <clyfish@gmail.com>2014-12-01 13:16:44 +0800
commitfe06fc85d3324b13518c8d44977dcd5ac19f9bbf (patch)
tree91b829ea350e28f59384cef96d880f5eec31fad8
parentf36a1eaa8b5203ab7e4616108c33a0b68668a8db (diff)
downloadtracifyjs-fe06fc85d3324b13518c8d44977dcd5ac19f9bbf.tar.gz
tracifyjs-fe06fc85d3324b13518c8d44977dcd5ac19f9bbf.zip
fix base54
-rw-r--r--lib/scope.js2
1 files changed, 2 insertions, 0 deletions
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;