Skip to content

Commit e70eb5f

Browse files
mingwandroidAlexpux
authored andcommitted
path.cc: Ignore zero-length exclusions
1 parent fadadd0 commit e70eb5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: winsup/cygwin/path.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3511,7 +3511,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
35113511
{
35123512
/* Since we've got regex linked we should maybe switch to that, but
35133513
running regexes for every argument could be too slow. */
3514-
if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg )
3514+
if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) )
35153515
return (char*)arg;
35163516
exclusions += strlen (exclusions) + 1;
35173517
}

0 commit comments

Comments
 (0)