mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
fix improper mz_stream mode set in mz_zip_reader_entry_save_buffer()
This commit is contained in:
parent
5d6cbe974d
commit
3ad5bb4a2f
2 changed files with 2 additions and 2 deletions
|
|
@ -810,7 +810,7 @@ int32_t mz_zip_reader_entry_save_buffer(void *handle, void *buf, int32_t len) {
|
||||||
|
|
||||||
mz_stream_mem_set_buffer(mem_stream, buf, len);
|
mz_stream_mem_set_buffer(mem_stream, buf, len);
|
||||||
|
|
||||||
err = mz_stream_mem_open(mem_stream, NULL, MZ_OPEN_MODE_READ);
|
err = mz_stream_mem_open(mem_stream, NULL, MZ_OPEN_MODE_WRITE);
|
||||||
if (err == MZ_OK)
|
if (err == MZ_OK)
|
||||||
err = mz_zip_reader_entry_save(reader, mem_stream, mz_stream_mem_write);
|
err = mz_zip_reader_entry_save(reader, mem_stream, mz_stream_mem_write);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ int32_t mz_zip_reader_entry_close(void *handle);
|
||||||
/* Closes an entry */
|
/* Closes an entry */
|
||||||
|
|
||||||
int32_t mz_zip_reader_entry_read(void *handle, void *buf, int32_t len);
|
int32_t mz_zip_reader_entry_read(void *handle, void *buf, int32_t len);
|
||||||
/* Reads and entry after being opened */
|
/* Reads an entry after being opened */
|
||||||
|
|
||||||
int32_t mz_zip_reader_entry_get_hash(void *handle, uint16_t algorithm, uint8_t *digest, int32_t digest_size);
|
int32_t mz_zip_reader_entry_get_hash(void *handle, uint16_t algorithm, uint8_t *digest, int32_t digest_size);
|
||||||
/* Gets a hash algorithm from the entry's extra field */
|
/* Gets a hash algorithm from the entry's extra field */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue