summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index a513d0e7..56d74ec8 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -2780,6 +2780,8 @@ class Cmd(cmd.Cmd):
try:
choice = int(response)
+ if choice < 1:
+ raise IndexError
result = fulloptions[choice - 1][0]
break
except (ValueError, IndexError):