From ce361a12e355f9e1e99c989f1ea056c9e502dbe7 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 31 Jan 2018 17:35:09 -0700 Subject: [PATCH] Use case-insensitive switch comparisons --- atom/app/command_line_args.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom/app/command_line_args.cc b/atom/app/command_line_args.cc index d7426de7dc56..e83eed46f2e1 100644 --- a/atom/app/command_line_args.cc +++ b/atom/app/command_line_args.cc @@ -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) {