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 dscho committed Apr 2, 2017
1 parent 8bd862a commit d50e35a
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 @@ -3452,7 +3452,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 d50e35a

Please sign in to comment.