]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fixing more test falure errors
authorbimbashrestha <bshrestha.msae@gmail.com>
Thu, 22 Aug 2019 20:54:41 +0000 (13:54 -0700)
committerbimbashrestha <bshrestha.msae@gmail.com>
Thu, 22 Aug 2019 20:54:41 +0000 (13:54 -0700)
lib/compress/zstd_compress.c

index 560548a974669e02b00cc1273ae19adc03ff3e63..6e02da4f03c3326ba588ab88d4f72bc52ce4d7d7 100644 (file)
@@ -2306,12 +2306,12 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc,
 
 out:
     if (!ZSTD_isError(cSize) && cSize > 1) {
-        assert(!ZSTD_isRLE(src, srcSize));
-
         /* confirm repcodes and entropy tables when emitting a compressed block */
         ZSTD_compressedBlockState_t* const tmp = zc->blockState.prevCBlock;
         zc->blockState.prevCBlock = zc->blockState.nextCBlock;
         zc->blockState.nextCBlock = tmp;
+
+        assert(!ZSTD_isRLE(src, srcSize));
     }
     /* We check that dictionaries have offset codes available for the first
      * block. After the first block, the offcode table might not have large