summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-01-16 09:27:04 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-01-16 09:27:04 +0000
commit7e19e61ec16accc3c1128912f7b8f0b7caf5d34c (patch)
tree7b737c1f491e02e93fd7567a6b14af8532db5b36
parent96f8883ca0e2a706c5a6e0d288a1bd4d8b3730bb (diff)
[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
-rw-r--r--lldb/source/Host/common/Editline.cpp2
1 files changed, 1 insertions, 1 deletions
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;