Skip to content

Commit

Permalink
Merge pull request #65 from cuavas/explicitcast
Browse files Browse the repository at this point in the history
Explicitly cast integers to pointers when pushing checksum on Lua stack
  • Loading branch information
brimworks authored Mar 9, 2023
2 parents 3f5c326 + 43c30a1 commit 15d4bc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua_zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,8 @@ static int lz_checksum(lua_State *L) {
}

static int lz_checksum_new(lua_State *L, checksum_t checksum, checksum_combine_t combine) {
lua_pushlightuserdata(L, checksum);
lua_pushlightuserdata(L, combine);
lua_pushlightuserdata(L, (void *)checksum);
lua_pushlightuserdata(L, (void *)combine);
lua_pushnumber(L, checksum(0L, Z_NULL, 0));
lua_pushnumber(L, 0);
lua_pushcclosure(L, lz_checksum, 4);
Expand Down

0 comments on commit 15d4bc8

Please sign in to comment.