mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Use case-insensitive switch comparisons
This commit is contained in:
committed by
Charles Kerr
parent
278c58055e
commit
ce361a12e3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user