Skip to content

Commit c0ce45c

Browse files
authored
Update Base64Decode.js
The array length should be 1/4 the size of the raw binary string, otherwise you end up with a bunch of undefined array values at the end.
1 parent be4303e commit c0ce45c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tilemaps/parsers/tiled/Base64Decode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Base64Decode = function (data)
1818
{
1919
var binaryString = window.atob(data);
2020
var len = binaryString.length;
21-
var bytes = new Array(len);
21+
var bytes = new Array(len / 4);
2222

2323
// Interpret binaryString as an array of bytes representing little-endian encoded uint32 values.
2424
for (var i = 0; i < len; i += 4)

0 commit comments

Comments
 (0)