mirror of
https://github.com/facebook/zstd.git
synced 2025-12-08 00:03:24 -05:00
handling nil case for refprefix
This commit is contained in:
parent
794f03459e
commit
1658ae75cd
@ -945,9 +945,11 @@ size_t ZSTD_CCtx_refPrefix_advanced(
|
|||||||
{
|
{
|
||||||
RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong);
|
RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong);
|
||||||
ZSTD_clearAllDicts(cctx);
|
ZSTD_clearAllDicts(cctx);
|
||||||
|
if (prefix != NULL && prefixSize > 0) {
|
||||||
cctx->prefixDict.dict = prefix;
|
cctx->prefixDict.dict = prefix;
|
||||||
cctx->prefixDict.dictSize = prefixSize;
|
cctx->prefixDict.dictSize = prefixSize;
|
||||||
cctx->prefixDict.dictContentType = dictContentType;
|
cctx->prefixDict.dictContentType = dictContentType;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user