fixed ZSTD_refPrefix with Multithread-enabled CCtx

This commit is contained in:
Yann Collet
2017-06-28 11:09:43 -07:00
parent 1fd2df9c2c
commit 33a6639039
5 changed files with 52 additions and 25 deletions
+1 -1
View File
@@ -586,7 +586,7 @@ size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
if (dict) {
ZSTD_freeCDict(zcs->cdictLocal);
zcs->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize,
0 /* byRef */, ZSTD_dm_auto,
0 /* byRef */, ZSTD_dm_auto, /* note : a loadPrefix becomes an internal CDict */
params.cParams, zcs->cMem);
zcs->cdict = zcs->cdictLocal;
if (zcs->cdictLocal == NULL) return ERROR(memory_allocation);