Skip to content

Commit

Permalink
Remove buffers noAssert argument
Browse files Browse the repository at this point in the history
The support for the `noAssert` argument dropped for the upcoming
Node.js 10.x release. This just removes the argument and should not
have any further impact.
  • Loading branch information
BridgeAR committed Mar 10, 2018
1 parent 576f7c5 commit 5a280de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion headers/entryHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ module.exports = function () {
// modification time (2 bytes time, 2 bytes date)
data.writeUInt32LE(_time, Constants.CENTIM);
// uncompressed file crc-32 value
data.writeInt32LE(_crc, Constants.CENCRC, true);
data.writeInt32LE(_crc, Constants.CENCRC);

This comment has been minimized.

Copy link
@vzakon

vzakon Apr 26, 2018

Your Utils.crc32 returns UInt32LE.
When noAssert parameter value true is removed this line can produce the error: TypeError: "value" argument is out of bounds
To resolve this issue you have to use writeUInt32LE in this line.

This comment has been minimized.

Copy link
@anhoev

anhoev Apr 26, 2018

you are right, i have the error in mac os too, you should make a pull request .

// compressed size
data.writeUInt32LE(_compressedSize, Constants.CENSIZ);
// uncompressed size
Expand Down

0 comments on commit 5a280de

Please sign in to comment.