summaryrefslogtreecommitdiff
path: root/src/string/wcsstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/wcsstr.c')
-rw-r--r--src/string/wcsstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/wcsstr.c b/src/string/wcsstr.c
index 3e28e287..4caaef3c 100644
--- a/src/string/wcsstr.c
+++ b/src/string/wcsstr.c
@@ -84,7 +84,7 @@ static wchar_t *twoway_wcsstr(const wchar_t *h, const wchar_t *n)
}
/* Compare left half */
for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--);
- if (k == mem) return (wchar_t *)h;
+ if (k <= mem) return (wchar_t *)h;
h += p;
mem = mem0;
}