[libzstd] Set CLEVEL_CUSTOM correctly

In `ZSTD_compressBegin_advanced()`, `ZSTD_parameters` are used to set the
compression parameters, but the level didn't get set to `CLEVEL_CUSTOM`, so
`ZSTD_compressBlock()` used the wrong parameters when checking the source
size.
This commit is contained in:
Nick Terrell 2017-10-02 13:43:30 -07:00
parent 7f580f9ee8
commit 86e83e926f

View File

@ -240,6 +240,7 @@ static ZSTD_CCtx_params ZSTD_assignParamsToCCtxParams(
ZSTD_CCtx_params ret = cctxParams;
ret.cParams = params.cParams;
ret.fParams = params.fParams;
ret.compressionLevel = ZSTD_CLEVEL_CUSTOM;
return ret;
}