diff options
author | Jim Ingham <jingham@apple.com> | 2018-04-11 19:27:03 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2018-04-11 19:27:03 +0000 |
commit | 7b57946801a1a85f09374659576fd5e26bbdb1ba (patch) | |
tree | 84fcc8fa951e845fccb923c8cadd92ce6feed2c6 /lldb/source/Commands/CommandObjectMemory.cpp | |
parent | 97d18bf9e982b65f9d2c266115faa78d7946ad43 (diff) | |
download | bcm5719-llvm-7b57946801a1a85f09374659576fd5e26bbdb1ba.tar.gz bcm5719-llvm-7b57946801a1a85f09374659576fd5e26bbdb1ba.zip |
Fix a thinko in CommandObjectMemoryRegion.
Don't try to read the first argument till you've checked
that there is one.
llvm-svn: 329844
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index aacb13405d2..106b65dfb8a 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -1710,8 +1710,8 @@ protected: m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus(eReturnStatusFailed); } else { - auto load_addr_str = command[0].ref; if (command.GetArgumentCount() == 1) { + auto load_addr_str = command[0].ref; load_addr = OptionArgParser::ToAddress(&m_exe_ctx, load_addr_str, LLDB_INVALID_ADDRESS, &error); if (error.Fail() || load_addr == LLDB_INVALID_ADDRESS) { |