Skip to content

Commit

Permalink
path.cc: Ignore zero-length exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwandroid authored and Git for Windows Build Agent committed Mar 16, 2019
1 parent 9fa9fe9 commit 55d72a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion winsup/cygwin/path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3625,7 +3625,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
{
/* Since we've got regex linked we should maybe switch to that, but
running regexes for every argument could be too slow. */
if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg )
if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) )
return (char*)arg;
exclusions += strlen (exclusions) + 1;
}
Expand Down

0 comments on commit 55d72a8

Please sign in to comment.