From: Cheng Liangyu Date: Mon, 1 Dec 2014 05:16:44 +0000 (+0800) Subject: fix base54 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=fe06fc85d3324b13518c8d44977dcd5ac19f9bbf;p=UglifyJS.git fix base54 --- 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;