Skip to content

Commit

Permalink
Fix: bad buffer.alloc for .toBuffer in async mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Congelli501 authored Sep 24, 2018
1 parent b73d0c8 commit 1bd2ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zipFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ module.exports = function (/*String|Buffer*/input, /*Number*/inputType) {
entry.header.offset = dindex;
// data header
var dataHeader = entry.header.dataHeaderToBinary();
var postHeader = Buffer.alloc(name);
var postHeader = Buffer.from(name);
var dataLength = dataHeader.length + postHeader.length + compressedData.length;

dindex += dataLength;
Expand Down

0 comments on commit 1bd2ae5

Please sign in to comment.