diff --git a/minizip.c b/minizip.c index 47d35a2d..098d75ee 100644 --- a/minizip.c +++ b/minizip.c @@ -573,7 +573,7 @@ int main(int argc, const char *argv[]) { else if ((c == 'v') || (c == 'V')) options.verbose = 1; else if ((c >= '0') && (c <= '9')) { - options.compress_level = (c - '0'); + options.compress_level = (int16_t)atoi(&argv[i][1]); if (options.compress_level == 0) options.compress_method = MZ_COMPRESS_METHOD_STORE; } else if ((c == 'b') || (c == 'B')) diff --git a/mz_strm_zstd.c b/mz_strm_zstd.c index 71a7b20a..c714b369 100644 --- a/mz_strm_zstd.c +++ b/mz_strm_zstd.c @@ -313,7 +313,7 @@ int32_t mz_stream_zstd_set_prop_int64(void *stream, int32_t prop, int64_t value) switch (prop) { case MZ_STREAM_PROP_COMPRESS_LEVEL: if (value < 0) - zstd->preset = 6; + zstd->preset = 0; // Use zstd default. else zstd->preset = (int16_t)value; return MZ_OK;