mirror of
https://github.com/zlib-ng/minizip-ng
synced 2025-03-28 21:13:18 +00:00
Error if seeking to before the start of a mem stream
This commit is contained in:
parent
826113fd6c
commit
c8501a4216
@ -184,6 +184,10 @@ int32_t mz_stream_mem_seek(void *stream, int64_t offset, int32_t origin)
|
||||
|
||||
mz_stream_mem_set_size(stream, (int32_t)new_pos);
|
||||
}
|
||||
else if (new_pos < 0)
|
||||
{
|
||||
return MZ_SEEK_ERROR;
|
||||
}
|
||||
|
||||
mem->position = (int32_t)new_pos;
|
||||
return MZ_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user