Skip to content

Commit 103ed5d

Browse files
committed
Fix critical issue with typed arrays > 8bit. Bump to 0.0.6
1 parent a3a401c commit 103ed5d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dist/binarypack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! binarypack.js build:0.0.4, development. Copyright(c) 2012 Eric Zhang <eric@ericzhang.com> MIT Licensed */
1+
/*! binarypack.js build:0.0.6, development. Copyright(c) 2012 Eric Zhang <eric@ericzhang.com> MIT Licensed */
22
(function(exports){
33
var binaryFeatures = {};
44
binaryFeatures.useBlobBuilder = (function(){
@@ -367,7 +367,7 @@ Packer.prototype.pack = function(value){
367367
}
368368
} else if ('BYTES_PER_ELEMENT' in value){
369369
if(binaryFeatures.useArrayBufferView) {
370-
this.pack_bin(value);
370+
this.pack_bin(new Uint8Array(value.buffer));
371371
} else {
372372
this.pack_bin(value.buffer);
373373
}

dist/binarypack.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)