Use case-insensitive switch comparisons
This commit is contained in:
parent
278c58055e
commit
ce361a12e3
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue