Index: base/command_line.cc |
diff --git a/base/command_line.cc b/base/command_line.cc |
index 983181fc7a613edd133905a4759369ac61fee3a0..29467e3196b41a328f6de6e3eefaae26af7d2aed 100644 |
--- a/base/command_line.cc |
+++ b/base/command_line.cc |
@@ -50,7 +50,8 @@ bool IsSwitch(const CommandLine::StringType& string, |
CommandLine::StringType* switch_value) { |
switch_string->clear(); |
switch_value->clear(); |
- if (GetSwitchPrefixLength(string) == 0) |
+ size_t prefix_length = GetSwitchPrefixLength(string); |
+ if (prefix_length == 0 || prefix_length == string.length()) |
return false; |
const size_t equals_position = string.find(kSwitchValueSeparator); |