From 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 6 Jan 2016 20:12:03 +0000 Subject: Vendor import of lldb trunk r256945: https://llvm.org/svn/llvm-project/lldb/trunk@256945 --- source/Interpreter/CommandHistory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/Interpreter/CommandHistory.cpp') diff --git a/source/Interpreter/CommandHistory.cpp b/source/Interpreter/CommandHistory.cpp index bbe64b446acc..9d3c814697b0 100644 --- a/source/Interpreter/CommandHistory.cpp +++ b/source/Interpreter/CommandHistory.cpp @@ -130,9 +130,9 @@ CommandHistory::Dump (Stream& stream, size_t stop_idx) const { Mutex::Locker locker(m_mutex); - stop_idx = std::min(stop_idx, m_history.size() - 1); + stop_idx = std::min(stop_idx + 1, m_history.size()); for (size_t counter = start_idx; - counter <= stop_idx; + counter < stop_idx; counter++) { const std::string hist_item = m_history[counter]; -- cgit v1.2.3