mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 14:40:37 +08: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
|
@ -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 New Issue
Block a user