summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2017-04-19 23:21:04 +0000
committerJim Ingham <jingham@apple.com>2017-04-19 23:21:04 +0000
commitaab5be050596d6423d1f48c89cb5e57321bc3931 (patch)
treeb622e2f19f88a96c9b2896dbe6e0341154bd6c00 /lldb/source/Interpreter
parentaa0cec7d6dbe602af9e0f9f0bb89eb750856baf2 (diff)
downloadbcm5719-llvm-aab5be050596d6423d1f48c89cb5e57321bc3931.tar.gz
bcm5719-llvm-aab5be050596d6423d1f48c89cb5e57321bc3931.zip
Fix !N and !-N commands and add a test case.
<rdar://problem/31713267> llvm-svn: 300785
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandHistory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandHistory.cpp b/lldb/source/Interpreter/CommandHistory.cpp
index 0fa25ed806f..ca5c90692b6 100644
--- a/lldb/source/Interpreter/CommandHistory.cpp
+++ b/lldb/source/Interpreter/CommandHistory.cpp
@@ -47,13 +47,13 @@ CommandHistory::FindString(llvm::StringRef input_str) const {
size_t idx = 0;
if (input_str.front() == '-') {
- if (input_str.drop_front(2).getAsInteger(0, idx))
+ if (input_str.drop_front(1).getAsInteger(0, idx))
return llvm::None;
if (idx >= m_history.size())
return llvm::None;
idx = m_history.size() - idx;
} else {
- if (input_str.drop_front().getAsInteger(0, idx))
+ if (input_str.getAsInteger(0, idx))
return llvm::None;
if (idx >= m_history.size())
return llvm::None;
OpenPOWER on IntegriCloud