This commit is contained in:
Nathan Moinvaziri 2018-11-06 09:39:00 -08:00
commit a18f49f6d3

View File

@ -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;