Author: jingham Date: Wed Apr 11 12:27:03 2018 New Revision: 329844 URL: http://llvm.org/viewvc/llvm-project?rev=329844&view=rev Log: Fix a thinko in CommandObjectMemoryRegion.
Don't try to read the first argument till you've checked that there is one. Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=329844&r1=329843&r2=329844&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Wed Apr 11 12:27:03 2018 @@ -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) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits