Skip to content
Commit f49a4440 authored by Jordan Rupprecht's avatar Jordan Rupprecht
Browse files

[lldb][Editline] Fix crash when navigating through empty command history.

An empty history entry can happen by entering the expression evaluator an immediately hitting enter:

```
$ lldb
(lldb) e
Enter expressions, then terminate with an empty line to evaluate:
  1:  <hit enter>
```

The next time the user enters the expression evaluator, if they hit the up arrow to load the previous expression, lldb crashes. This patch treats empty history sessions as a single expression of zero length, instead of an empty list of expressions.

Fixes http://llvm.org/PR49845.

Differential Revision: https://reviews.llvm.org/D100048
parent f087d754
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment