musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/strstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/strstr.c')
-rw-r--r--src/string/strstr.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strstr.c b/src/string/strstr.c
index c7d66682..55ba1c7b 100644
--- a/src/string/strstr.c
+++ b/src/string/strstr.c
@@ -109,7 +109,7 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n)
if (BITOP(byteset, h[l-1], &)) {
k = l-shift[h[l-1]];
if (k) {
- if (mem && k < p) k = l-p;
+ if (k < mem) k = mem;
h += k;
mem = 0;
continue;
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月13日 13:11:45 +0000

AltStyle によって変換されたページ (->オリジナル) /