From a3a25afe38b3b58ef479e384ac3f0622c3d93187 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Wed, 16 Jan 2019 09:27:04 +0000 Subject: [PATCH] [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 llvm-svn: 351313 --- 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 81fb672..f7ba4b5 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; -- 2.7.4