LibC: Fix typo/bug in fnmatch
* would stop matching at '0' instead of end of string
This commit is contained in:
parent
f022a1b08f
commit
5abddd448e
|
|
@ -15,7 +15,7 @@ static int fnmatch_impl(const char* pattern, const char* string, int flags, bool
|
||||||
{
|
{
|
||||||
case '*':
|
case '*':
|
||||||
{
|
{
|
||||||
const char* ptr = strchrnul(string, (flags & FNM_PATHNAME) ? '/' : '0');
|
const char* ptr = strchrnul(string, (flags & FNM_PATHNAME) ? '/' : '\0');
|
||||||
while (ptr >= string)
|
while (ptr >= string)
|
||||||
if (fnmatch_impl(pattern + 1, ptr--, flags, false) == 0)
|
if (fnmatch_impl(pattern + 1, ptr--, flags, false) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue