Comparing version 1.6.3 to 1.6.4
@@ -95,9 +95,12 @@ const ascii = require('./lib/ascii') | ||
buffers.reduce( | ||
(offset, buffer) => { | ||
result.set(buffer, offset) | ||
return offset + buffer.byteLength | ||
}, | ||
0 | ||
) | ||
let offset = 0 | ||
for (const buffer of buffers) { | ||
if (offset + buffer.byteLength > result.byteLength) { | ||
const sub = buffer.subarray(0, result.byteLength - offset) | ||
result.set(sub, offset) | ||
return result | ||
} | ||
result.set(buffer, offset) | ||
offset += buffer.byteLength | ||
} | ||
@@ -104,0 +107,0 @@ return result |
{ | ||
"name": "b4a", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"description": "Bridging the gap between buffers and typed arrays", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
27640
759