Skip to content
Permalink
Browse files Browse the repository at this point in the history
Use case-insensitive switch comparisons
  • Loading branch information
MarshallOfSound authored and ckerr committed Feb 1, 2018
1 parent 278c580 commit ce361a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atom/app/command_line_args.cc
Expand Up @@ -1390,7 +1390,8 @@ bool IsBlacklistedArg(const base::CommandLine::CharType* arg) {

if (prefix_length > 0) {
a += prefix_length;
std::string switch_name(a, strcspn(a, "="));
std::string switch_name =
base::ToLowerASCII(base::StringPiece(a, strcspn(a, "=")));
auto* iter = std::lower_bound(std::begin(kBlacklist), std::end(kBlacklist),
switch_name);
if (iter != std::end(kBlacklist) && switch_name == *iter) {
Expand Down

0 comments on commit ce361a1

Please sign in to comment.