SHA256
1
0
forked from pool/grep
grep/wordmatch.patch

13 lines
330 B
Diff

--- src/search.c
+++ src/search.c
@@ -641,7 +641,8 @@
break;
if (try + len < buf + size && WCHAR((unsigned char) try[len]))
{
- offset = kwsexec (kwset, beg, --len, &kwsmatch);
+ ++beg;
+ offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
if (offset == (size_t) -1)
{
#ifdef MBS_SUPPORT