Skip to content

Commit

Permalink
fix: adler32's first 16-bit should default to 1 not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal2453 authored and zhaozg committed Aug 20, 2024
1 parent 4e92094 commit eb1d7c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lminiz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb1d7c9

Please sign in to comment.