From 26a96a5b35deaa64c79bcf1bc39f00dee16ddfb4 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Tue, 15 Sep 2020 13:57:43 -0400 Subject: [PATCH] Do More Complete CParams Deduction in Non-DDSS Path of ZSTD_createCDict_advanced2 Call ZSTD_getCParamsFromCCtxParams() instead of ZSTD_getCParams_internal(). --- lib/compress/zstd_compress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 3e2ecdc4..08d09aa4 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -3540,8 +3540,8 @@ ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_advanced2(const void* dict, size_t dict ZSTD_dedicatedDictSearch_isSupported( cctxParams->compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); if (!dedicatedDictSearch) { - ZSTD_compressionParameters cParams = ZSTD_getCParams_internal( - cctxParams->compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); + ZSTD_compressionParameters cParams = ZSTD_getCParamsFromCCtxParams( + cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, dictSize); return ZSTD_createCDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, cParams, customMem);