]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Refine ip Initialization to Avoid ARM Weirdness
authorW. Felix Handte <w@felixhandte.com>
Tue, 15 May 2018 05:15:33 +0000 (01:15 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 23 May 2018 21:53:03 +0000 (17:53 -0400)
lib/compress/zstd_fast.c

index dacb26370dc00ada3f757805feb7c316c1c91f5c..5c6f0dc8b5433b0a147aa2f7fa920b5f169ebffe 100644 (file)
@@ -83,7 +83,7 @@ size_t ZSTD_compressBlock_fast_generic(
         || localLowestIndex >= (U32)(dictEnd - dictBase));
 
     /* init */
-    ip += (dictMode == ZSTD_noDict && ip == localLowest);
+    ip += (ip - localLowest + dictEnd - dictLowest == 0);
     {   U32 const maxRep = dictMode == ZSTD_dictMatchState ?
                            (U32)(ip - localLowest + dictEnd - dictLowest) :
                            (U32)(ip - localLowest);