aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/lz4hc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 5882109d..93017f1f 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -268,7 +268,8 @@ LZ4_FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch (
if (nextOffset==1) {
/* may be a repeated pattern */
if (repeat == rep_untested) {
- if ((pattern & 0xFFFF) == (pattern >> 16)) { /* is it enough ? */
+ if ( ((pattern & 0xFFFF) == (pattern >> 16))
+ & ((pattern & 0xFF) == (pattern >> 24)) ) {
repeat = rep_confirmed;
srcPatternLength = LZ4HC_countPattern(ip+4, iHighLimit, pattern) + 4;
} else {