mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix wildcarding bug where ? at end of wildcard could match 0 characters
darcs-hash:20060328180916-ac50b-6f77d936a1e46e411a12ca96fd9ad3bb844d321b.gz
This commit is contained in:
parent
7a07d7c188
commit
749dad1309
1 changed files with 8 additions and 0 deletions
|
@ -124,6 +124,14 @@ static int wildcard_match2( const wchar_t *str,
|
|||
while( *(str++) != 0 );
|
||||
return 0;
|
||||
}
|
||||
else if( *str == 0 )
|
||||
{
|
||||
/*
|
||||
End of string, but not end of wildcard, and the next wildcard
|
||||
element is not a '*', so this is not a match.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( *wc == ANY_CHAR )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue