From f3a5459ef72f9887e63e1a9dc6a3c2890323e89a Mon Sep 17 00:00:00 2001 From: Jake Funke Date: Mon, 18 Jun 2018 18:16:05 +0000 Subject: [PATCH] menu range fix --- menu_screen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu_screen.py b/menu_screen.py index 69fd51f..77e9271 100644 --- a/menu_screen.py +++ b/menu_screen.py @@ -259,7 +259,7 @@ class CursedMenu(object): return self.options[-1] # this is a number; check to see if we can set it - if user_in >= ord('1') and user_in <= ord(str(min(9,len(self.options)+1))): + if user_in >= ord('1') and user_in <= ord(str(min(6,len(self.options)))): self.selected = user_in - ord('0') - 1 # convert keypress back to a number, then subtract 1 to get index return