Browse Source

zlib: level can be negative

v0.11.4-release
Brian White 12 years ago
committed by Ben Noordhuis
parent
commit
e945903671
  1. 2
      src/node_zlib.cc

2
src/node_zlib.cc

@ -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();

Loading…
Cancel
Save