aboutsummaryrefslogtreecommitdiff
path: root/source/Interpreter/CommandHistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Interpreter/CommandHistory.cpp')
-rw-r--r--source/Interpreter/CommandHistory.cpp4
1 files changed, 2 insertions, 2 deletions
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];