zlib: level can be negative

archived-io.js-v0.10
Brian White 2013-07-01 05:42:36 -04:00 committed by Ben Noordhuis
parent c9644fbd7c
commit e945903671
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ class ZCtx : public ObjectWrap {
int windowBits = args[0]->Uint32Value(); int windowBits = args[0]->Uint32Value();
assert((windowBits >= 8 && windowBits <= 15) && "invalid windowBits"); 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"); assert((level >= -1 && level <= 9) && "invalid compression level");
int memLevel = args[2]->Uint32Value(); int memLevel = args[2]->Uint32Value();