mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix 'grep -Fw' for encodings other than UTF-8 (RH bug #161700).
PR: 87969 Obtained from: Fedora (Tim Waugh)
This commit is contained in:
parent
d24864f785
commit
ebeecabae3
1 changed files with 2 additions and 2 deletions
|
|
@ -960,7 +960,7 @@ Fexecute (char const *buf, size_t size, size_t *match_size, int exact)
|
|||
}
|
||||
else
|
||||
#endif /* MBS_SUPPORT */
|
||||
if (!WCHAR ((unsigned char) beg[-1]))
|
||||
if (WCHAR ((unsigned char) beg[-1]))
|
||||
goto next_char;
|
||||
}
|
||||
#ifdef MBS_SUPPORT
|
||||
|
|
@ -980,7 +980,7 @@ Fexecute (char const *buf, size_t size, size_t *match_size, int exact)
|
|||
}
|
||||
else
|
||||
#endif /* MBS_SUPPORT */
|
||||
if (beg + len >= buf + size && !WCHAR ((unsigned char) beg[len]))
|
||||
if (beg + len >= buf + size || !WCHAR ((unsigned char) beg[len]))
|
||||
word_match = 1;
|
||||
if (word_match)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue