Skip to content

Commit dc3c2d1

Browse files
mscdexbnoordhuis
authored andcommitted
zlib: level can be negative
This is a back-port of commit e945903 from the master branch.
1 parent 95dcd11 commit dc3c2d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_zlib.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class ZCtx : public ObjectWrap {
329329
int windowBits = args[0]->Uint32Value();
330330
assert((windowBits >= 8 && windowBits <= 15) && "invalid windowBits");
331331

332-
int level = args[1]->Uint32Value();
332+
int level = args[1]->Int32Value();
333333
assert((level >= -1 && level <= 9) && "invalid compression level");
334334

335335
int memLevel = args[2]->Uint32Value();

0 commit comments

Comments
 (0)