summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-04-17 23:18:37 (GMT)
committerYann Collet <cyan@fb.com>2018-04-17 23:18:37 (GMT)
commit88cca1723e76c8f5031954ba07b28447c0cb55d8 (patch)
treebffe8d57e40a8bfc734a62e7b0e46905d74d1540 /lib/lz4.c
parent152064218361e5762fd67b5de425707fdc47095b (diff)
downloadlz4-88cca1723e76c8f5031954ba07b28447c0cb55d8.zip
lz4-88cca1723e76c8f5031954ba07b28447c0cb55d8.tar.gz
lz4-88cca1723e76c8f5031954ba07b28447c0cb55d8.tar.bz2
fix dictDelta setting error
wrong test
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index c799596..e7553ed 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -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 */