js-binary-schema-parser
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -17,5 +17,14 @@ "use strict"; | ||
var chunks = []; | ||
var streamSize = stream.data.length; | ||
var total = 0; | ||
for (var size = (0, _uint.readByte)()(stream); size !== terminator; size = (0, _uint.readByte)()(stream)) { | ||
// catch corrupted files with no terminator | ||
if (stream.pos + size >= streamSize) { | ||
var availableSize = streamSize - stream.pos; | ||
chunks.push((0, _uint.readBytes)(availableSize)(stream)); | ||
total += availableSize; | ||
break; | ||
} | ||
chunks.push((0, _uint.readBytes)(size)(stream)); | ||
@@ -22,0 +31,0 @@ total += size; |
{ | ||
"name": "js-binary-schema-parser", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Parse binary files with a schema into nicely readable objects", | ||
@@ -5,0 +5,0 @@ "dependencies": {}, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
640
3157732