Skip to content

Commit

Permalink
Fix zip_delete_entries bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Howardshih committed Nov 19, 2023
1 parent d15aa0c commit fbaf7b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ static int zip_central_dir_move(mz_zip_internal_state *pState, int begin,

if (next && l_size == 0) {
memmove(pState->m_central_dir.m_p, next, r_size);
pState->m_central_dir.m_p = MZ_REALLOC(pState->m_central_dir.m_p, r_size);
{
int i;
for (i = end; i < entry_num; i++) {
Expand Down Expand Up @@ -735,8 +734,7 @@ static int zip_central_dir_delete(mz_zip_internal_state *pState,
d_num += end - begin;
}

pState->m_central_dir_offsets.m_size =
sizeof(mz_uint32) * (entry_num - d_num);
pState->m_central_dir_offsets.m_size = entry_num - d_num;
return 0;
}

Expand Down

0 comments on commit fbaf7b8

Please sign in to comment.