Skip to content

Commit c80abfa

Browse files
committed
zlib: fix Failed to set dictionary issue
1 parent 27c8572 commit c80abfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_zlib.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
322322
static void SetDictionary(ZCtx* ctx) {
323323
if (ctx->dictionary_ == NULL) return;
324324

325-
int err;
325+
int err = Z_OK;
326326

327327
switch (mode) {
328328
case DEFLATE:
@@ -339,7 +339,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
339339
}
340340

341341
static void Reset(ZCtx* ctx) {
342-
int err;
342+
int err = Z_OK;
343343

344344
switch (mode) {
345345
case DEFLATE:

0 commit comments

Comments
 (0)