Optimize Dict Check Condition
authorW. Felix Handte <w@felixhandte.com>
Tue, 6 Mar 2018 20:53:22 +0000 (15:53 -0500)
committerW. Felix Handte <w@felixhandte.com>
Mon, 12 Mar 2018 18:58:43 +0000 (14:58 -0400)
lib/lz4.c

index d147681..4f98efa 100644 (file)
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -708,7 +708,7 @@ _next_match:
         /* Encode MatchLength */
         {   unsigned matchCode;
 
-            if ((dictDirective==usingExtDict || dictDirective==usingExtDictCtx) && (dictionary != NULL) && (lowLimit==dictLowLimit)) {
+            if ((dictDirective==usingExtDict || dictDirective==usingExtDictCtx) && ((lowLimit==dictLowLimit) & (dictionary != NULL))) {
                 const BYTE* limit;
                 match += refDelta;
                 limit = ip + (dictEnd-match);