Skip to content

Commit

Permalink
Fixed error on new added param
Browse files Browse the repository at this point in the history
  • Loading branch information
cthackers committed Jun 4, 2024
1 parent c13733a commit 8bc4111
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion methods/inflater.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const version = +(process.versions ? process.versions.node : "").split(".")[0] |

module.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) {
var zlib = require("zlib");
const option = version >= 15 ? { maxOutputLength: expectedLength } : {};
const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {};

return {
inflate: function () {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adm-zip",
"version": "0.5.13",
"version": "0.5.14",
"description": "Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk",
"scripts": {
"test": "mocha -R spec",
Expand Down

0 comments on commit 8bc4111

Please sign in to comment.