From fd9bc13803ee24bfa674311584126b83e059d756 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 4 Oct 2021 14:23:44 +0200 Subject: [PATCH] [lldb] Fix a stray array access in Editline This manifested itself as an asan failure in TestMultilineNavigation.py. --- 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 b550613..6898f84 100644 --- a/lldb/source/Host/common/Editline.cpp +++ b/lldb/source/Host/common/Editline.cpp @@ -1560,7 +1560,7 @@ bool Editline::GetLines(int first_line_number, StringList &lines, if (!interrupted) { // Save the completed entry in history before returning. Don't save empty // input as that just clutters the command history. - if (m_input_lines.size() > 1 || !m_input_lines.front().empty()) + if (!m_input_lines.empty()) m_history_sp->Enter(CombineLines(m_input_lines).c_str()); lines = GetInputAsStringList(); -- 2.7.4