diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2017-04-30 05:33:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-30 05:33:39 (GMT) |
commit | 11bfedb6c3b30b71c54e15ecbde9fab396d444e5 (patch) | |
tree | 45d6f739827a141cb2df0a59380627f5a7d79aa7 /lib/lz4hc.c | |
parent | 37ef330cd8780accf07f872ed465962a56bb8be7 (diff) | |
parent | 6cf1f7d758c23d6033d388eabbbb50380c364d2e (diff) | |
download | lz4-11bfedb6c3b30b71c54e15ecbde9fab396d444e5.zip lz4-11bfedb6c3b30b71c54e15ecbde9fab396d444e5.tar.gz lz4-11bfedb6c3b30b71c54e15ecbde9fab396d444e5.tar.bz2 |
Merge pull request #349 from svpv/master
clamp hc levels > 12 + minor fixes in comments
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index ac15d20..16fe029 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -555,6 +555,8 @@ static int LZ4HC_compress_generic ( ctx->searchNum = LZ4HC_getSearchNum(cLevel); return LZ4HC_compress_optimal(ctx, src, dst, *srcSizePtr, dstCapacity, limit, 128, 0); default: + cLevel = 12; + /* pass-through */ case 12: ctx->searchNum = LZ4HC_getSearchNum(cLevel); return LZ4HC_compress_optimal(ctx, src, dst, *srcSizePtr, dstCapacity, limit, LZ4_OPT_NUM, 1); |