diff options
Diffstat (limited to 'lldb/source/Interpreter')
| -rw-r--r-- | lldb/source/Interpreter/OptionValueDictionary.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionValueDictionary.cpp b/lldb/source/Interpreter/OptionValueDictionary.cpp index a209a694563..d2045470798 100644 --- a/lldb/source/Interpreter/OptionValueDictionary.cpp +++ b/lldb/source/Interpreter/OptionValueDictionary.cpp @@ -117,6 +117,12 @@ OptionValueDictionary::SetArgs (const Args &args, VarSetOperationType op) llvm::StringRef key_and_value(args.GetArgumentAtIndex(i)); if (!key_and_value.empty()) { + if (key_and_value.find('=') == llvm::StringRef::npos) + { + error.SetErrorString("assign operation takes one or more key=value arguments"); + return error; + } + std::pair<llvm::StringRef, llvm::StringRef> kvp(key_and_value.split('=')); llvm::StringRef key = kvp.first; bool key_valid = false; |

