Browse Source

Merge pull request #11786 from electron/case-insensitive-comparison-1-6-x

Do case insensitive comparisons
John Kleinschmidt 7 years ago
parent
commit
7f74a39346
1 changed files with 2 additions and 1 deletions
  1. 2 1
      atom/app/command_line_args.cc

+ 2 - 1
atom/app/command_line_args.cc

@@ -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;