Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
zlib: level can be negative
Browse files Browse the repository at this point in the history
This is a back-port of commit e945903 from the master branch.
  • Loading branch information
mscdex authored and bnoordhuis committed Jul 1, 2013
1 parent 95dcd11 commit dc3c2d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_zlib.cc
Expand Up @@ -329,7 +329,7 @@ class ZCtx : public ObjectWrap {
int windowBits = args[0]->Uint32Value();
assert((windowBits >= 8 && windowBits <= 15) && "invalid windowBits");

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

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

0 comments on commit dc3c2d1

Please sign in to comment.