fixed calculation of base64 array length
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@143 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -812,7 +812,7 @@ var Utils = {
|
||||
|
||||
"encode64" : function(input) {
|
||||
// base64 strings are 4/3 larger than the original string
|
||||
var output = new Array(parseInt(input.length*4/3));
|
||||
var output = new Array( Math.floor( (input.length + 2) / 3 ) * 4 );
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0, p = 0;
|
||||
|
||||
Reference in New Issue
Block a user