From 00b9386377796159d146bcb942db23f0efccdc1f 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 81b171c7..b506b8ec 100644 --- a/src/lminiz.c +++ b/src/lminiz.c @@ -356,7 +356,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);