mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 13:35:38 +08:00
StringRef::front asserts on empty strings, causing "break modify -c ''" to assert.
Added a check for empty at the point where we were going to crash. <rdar://problem/28654032> llvm-svn: 283479
This commit is contained in:
@@ -994,7 +994,7 @@ bool CommandObjectParsed::Execute(const char *args_string,
|
||||
}
|
||||
if (!handled) {
|
||||
for (auto entry : llvm::enumerate(cmd_args.entries())) {
|
||||
if (entry.Value.ref.front() == '`') {
|
||||
if (!entry.Value.ref.empty() && entry.Value.ref.front() == '`') {
|
||||
cmd_args.ReplaceArgumentAtIndex(
|
||||
entry.Index,
|
||||
m_interpreter.ProcessEmbeddedScriptCommands(entry.Value.c_str()));
|
||||
|
||||
Reference in New Issue
Block a user