Skip to content

Commit 4721557

Browse files
author
rusnakp
committed
fixed calculation of base64 array length
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@143 eee81c28-f429-11dd-99c0-75d572ba1ddd
1 parent 42c273c commit 4721557

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Copyright (c) 2009 John Resig
1414

1515
jQuery js-Hotkeys
1616
http://code.google.com/p/js-hotkeys/
17+
Copyright (c) 2008 Tzury Bar Yochay
1718

1819
jPicker
1920
http://www.digitalmagicpro.com/jPicker/

editor/svgcanvas.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ var Utils = {
812812

813813
"encode64" : function(input) {
814814
// base64 strings are 4/3 larger than the original string
815-
var output = new Array(parseInt(input.length*4/3));
815+
var output = new Array( Math.floor( (input.length + 2) / 3 ) * 4 );
816816
var chr1, chr2, chr3;
817817
var enc1, enc2, enc3, enc4;
818818
var i = 0, p = 0;

0 commit comments

Comments
 (0)