From d1715e1425e28c107aea20bbfdc4d49bcad37488 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 22 Feb 2013 23:23:42 +0000 Subject: [PATCH] Correct the logic in DumpCommandHistory when the end index is UINT32_MAX. llvm-svn: 175927 --- lldb/source/Interpreter/CommandInterpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index b28ed64b2524..631ed691bb65 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -2796,7 +2796,7 @@ CommandInterpreter::DumpHistory (Stream &stream, uint32_t count) const void CommandInterpreter::DumpHistory (Stream &stream, uint32_t start, uint32_t end) const { - const size_t last_idx = std::min(m_command_history.size(), end + 1); + const size_t last_idx = std::min(m_command_history.size(), end==UINT32_MAX ? UINT32_MAX : end + 1); for (size_t i = start; i < last_idx; i++) { if (!m_command_history[i].empty())