[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
This commit is contained in:
George Rimar 2019-01-16 09:27:04 +00:00
parent 5168ddfac4
commit a3a25afe38
1 changed files with 1 additions and 1 deletions

View File

@ -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;