Browse Source

fix bug https://github.com/pierrec/lz4/issues/29#issuecomment-416052849

honda.tatsuya 7 years ago
parent
commit
ac86632167
1 changed files with 1 additions and 1 deletions
  1. 1 1
      block.go

+ 1 - 1
block.go

@@ -286,7 +286,7 @@ func CompressBlockHC(src, dst []byte, depth int) (di int, err error) {
 			for ml < sn-si && src[next+ml] == src[si+ml] {
 				ml++
 			}
-			if ml+1 < minMatch || ml <= mLen {
+			if ml < minMatch || ml <= mLen {
 				// Match too small (<minMath) or smaller than the current match.
 				continue
 			}