diff options
author | Yann Collet <cyan@fb.com> | 2018-04-17 23:18:37 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2018-04-17 23:18:37 (GMT) |
commit | 88cca1723e76c8f5031954ba07b28447c0cb55d8 (patch) | |
tree | bffe8d57e40a8bfc734a62e7b0e46905d74d1540 /lib | |
parent | 152064218361e5762fd67b5de425707fdc47095b (diff) | |
download | lz4-88cca1723e76c8f5031954ba07b28447c0cb55d8.zip lz4-88cca1723e76c8f5031954ba07b28447c0cb55d8.tar.gz lz4-88cca1723e76c8f5031954ba07b28447c0cb55d8.tar.bz2 |
fix dictDelta setting error
wrong test
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -637,7 +637,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary; const U32 dictSize = dictDirective == usingDictCtx ? dictCtx->dictSize : cctx->dictSize; - const U32 dictDelta = usingDictCtx ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with index in current context */ + const U32 dictDelta = (dictDirective == usingDictCtx) ? startIndex - dictCtx->currentOffset : 0; /* make indexes in dictCtx comparable with index in current context */ int const maybe_extMem = (dictDirective == usingExtDict) || (dictDirective == usingDictCtx); U32 const prefixIdxLimit = startIndex - dictSize; /* used when dictDirective == dictSmall */ |