[Lldb-commits] [lldb] r351313 - [lldb] - Fix crash when listing the history with the key up.

George Rimar via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 16 01:27:05 PST 2019


Author: grimar
Date: Wed Jan 16 01:27:04 2019
New Revision: 351313

URL: http://llvm.org/viewvc/llvm-project?rev=351313&view=rev
Log:
[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

Modified:
    lldb/trunk/source/Host/common/Editline.cpp

Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=351313&r1=351312&r2=351313&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Wed Jan 16 01:27:04 2019
@@ -443,7 +443,7 @@ unsigned char Editline::RecallHistory(bo
     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;




More information about the lldb-commits mailing list