mirror of
https://github.com/zlib-ng/minizip-ng.git
synced 2026-01-18 13:11:19 +01:00
fix improper mz_stream mode set in mz_zip_reader_entry_save_buffer()
This commit is contained in:
committed by
Nathan Moinvaziri
parent
5d6cbe974d
commit
3ad5bb4a2f
@@ -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);
|
||||
|
||||
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)
|
||||
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 */
|
||||
|
||||
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);
|
||||
/* Gets a hash algorithm from the entry's extra field */
|
||||
|
||||
Reference in New Issue
Block a user