Skip to content

Commit 1bd2ae5

Browse files
authored
Fix: bad buffer.alloc for .toBuffer in async mode
1 parent b73d0c8 commit 1bd2ae5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zipFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ module.exports = function (/*String|Buffer*/input, /*Number*/inputType) {
267267
entry.header.offset = dindex;
268268
// data header
269269
var dataHeader = entry.header.dataHeaderToBinary();
270-
var postHeader = Buffer.alloc(name);
270+
var postHeader = Buffer.from(name);
271271
var dataLength = dataHeader.length + postHeader.length + compressedData.length;
272272

273273
dindex += dataLength;

0 commit comments

Comments
 (0)