Merge pull request #895 from lz4/hugefast
authorYann Collet <Cyan4973@users.noreply.github.com>
Mon, 10 Aug 2020 19:52:32 +0000 (12:52 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Aug 2020 19:52:32 +0000 (12:52 -0700)
Fix #876

1  2 
lib/lz4.c
lib/lz4.h

diff --cc lib/lz4.c
+++ b/lib/lz4.c
@@@ -1497,8 -1520,10 +1505,9 @@@ int LZ4_compress_fast_continue (LZ4_str
  
      DEBUGLOG(5, "LZ4_compress_fast_continue (inputSize=%i)", inputSize);
  
 -    if (streamPtr->dirty) { return 0; } /* Uninitialized structure detected */
      LZ4_renormDictT(streamPtr, inputSize);   /* avoid index overflow */
-     if (acceleration < 1) acceleration = ACCELERATION_DEFAULT;
+     if (acceleration < 1) acceleration = LZ4_ACCELERATION_DEFAULT;
+     if (acceleration > LZ4_ACCELERATION_MAX) acceleration = LZ4_ACCELERATION_MAX;
  
      /* invalidate tiny dictionaries */
      if ( (streamPtr->dictSize-1 < 4-1)   /* intentional underflow */
diff --cc lib/lz4.h
Simple merge