diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/simple_menu/simple_menu.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/simple_menu/simple_menu.sh b/examples/simple_menu/simple_menu.sh index 5752f0e..64c7a14 100644 --- a/examples/simple_menu/simple_menu.sh +++ b/examples/simple_menu/simple_menu.sh @@ -177,15 +177,15 @@ while true; do # Back to the previous menu # ''''''''''''''''''''''''' if (( ${#MENU_STACK[*]} == 1 )); then - process_menu ${MENU_STACK[-1]} + process_menu ${MENU_STACK[${#MENU_STACK[*]}-1]} else # Unstack the newly found submenu # ''''''''''''''''''''''''''''''' - unset MENU_STACK[-1] + unset MENU_STACK[${#MENU_STACK[*]}-1] # And generate the previous menu # '''''''''''''''''''''''''''''' - process_menu ${MENU_STACK[-1]} + process_menu ${MENU_STACK[${#MENU_STACK[*]}-1]} fi elif [[ $SEL == ">"* ]]; then |