summaryrefslogtreecommitdiff
path: root/src/string/strstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/strstr.c')
-rw-r--r--src/string/strstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strstr.c b/src/string/strstr.c
index 915c0a22..cd069127 100644
--- a/src/string/strstr.c
+++ b/src/string/strstr.c
@@ -130,7 +130,7 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n)
}
/* Compare left half */
for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--);
- if (k == mem) return (char *)h;
+ if (k <= mem) return (char *)h;
h += p;
mem = mem0;
}