summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2013-07-01 05:42:36 -0400
committerBen Noordhuis <info@bnoordhuis.nl>2013-07-01 19:37:50 +0200
commitdc3c2d12c850e88de3fe352e5ac9bbea911a66d7 (patch)
treeee89de41406bc51ad9635cc08ba607234682dff0
parent95dcd11dde4fff1ad69b5b5bd9e6c55a9ff1c4a0 (diff)
downloadnode-new-dc3c2d12c850e88de3fe352e5ac9bbea911a66d7.tar.gz
zlib: level can be negative
This is a back-port of commit e945903 from the master branch.
-rw-r--r--src/node_zlib.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index ebaba6bb11..9acbfcb75a 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -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();