From 7e19e61ec16accc3c1128912f7b8f0b7caf5d34c Mon Sep 17 00:00:00 2001 From: George Rimar Date: Wed, 16 Jan 2019 09:27:04 +0000 Subject: [lldb] - Fix crash when listing the history with the key up. This is https://bugs.llvm.org/show_bug.cgi?id=40112, Currently, lldb crashes after pressing the up arrow key when listing the history for expressions. The patch fixes the mistype that was a reason. Differential revision: https://reviews.llvm.org/D56014 --- lldb/source/Host/common/Editline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp index 81fb672b3bc..f7ba4b5822f 100644 --- a/lldb/source/Host/common/Editline.cpp +++ b/lldb/source/Host/common/Editline.cpp @@ -443,7 +443,7 @@ unsigned char Editline::RecallHistory(bool earlier) { m_live_history_lines = m_input_lines; m_in_history = true; } else { - if (history_w(pHistory, &history_event, earlier ? H_NEXT : H_PREV) == -1) { + if (history_w(pHistory, &history_event, earlier ? H_PREV : H_NEXT) == -1) { // Can't move earlier than the earliest entry if (earlier) return CC_ERROR; -- cgit v1.2.3