aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard van Velzen <rvanvelzen1@gmail.com>2015-01-04 14:00:23 +0100
committerRichard van Velzen <rvanvelzen1@gmail.com>2015-01-04 14:00:23 +0100
commit120948fa48278f3769acd4e57b7456ea5419a5f2 (patch)
tree275c40402335f7264c61b7a983a732069cf83afe
parent66e6f0c3cb53c311655eb42d025a416c8bbef61a (diff)
parentfe06fc85d3324b13518c8d44977dcd5ac19f9bbf (diff)
downloadtracifyjs-120948fa48278f3769acd4e57b7456ea5419a5f2.tar.gz
tracifyjs-120948fa48278f3769acd4e57b7456ea5419a5f2.zip
Merge pull request #584 from clyfish/fix-base54
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;