mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #11786 from electron/case-insensitive-comparison-1-6-x
Do case insensitive comparisons
This commit is contained in:
@@ -1378,7 +1378,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, "=")));
|
||||
for (auto& item : blacklist) {
|
||||
if (switch_name == item)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user