From eb1d7c92406267560aff2d9cd83fd5ca7dc3f414 Mon Sep 17 00:00:00 2001 From: Bilal2453 Date: Tue, 20 Aug 2024 10:37:21 +0300 Subject: [PATCH] fix: adler32's first 16-bit should default to 1 not 0 --- src/lminiz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lminiz.c b/src/lminiz.c index cab77d40..fb471dbe 100644 --- a/src/lminiz.c +++ b/src/lminiz.c @@ -357,7 +357,7 @@ static int ltdefl(lua_State* L) { } static int lmz_adler32(lua_State* L) { - mz_ulong adler = luaL_optinteger(L, 1, 0); + mz_ulong adler = luaL_optinteger(L, 1, 1); size_t buf_len = 0; const unsigned char* ptr = (const unsigned char*)luaL_optlstring(L, 2, NULL, &buf_len); adler = mz_adler32(adler, ptr, buf_len);