We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa09aef commit 1e2ad96Copy full SHA for 1e2ad96
prerequisites/stack.sh
@@ -120,7 +120,7 @@ function no_such_stack
120
# echo "Got $top"
121
#
122
# Modification for use with bash3boilerplate:
123
-# replaced "let _i-=1" with "(( _i-=1 ))"
+# replaced "let _i-=1" with "(( _i-=1 )) || true"
124
125
function stack_pop
126
{
@@ -141,7 +141,7 @@ function stack_pop
141
return 1
142
fi
143
144
- (( _i-=1 ))
+ (( _i-=1 )) || true
145
eval "$2"='$'"{_stack_$1[$_i]}"
146
eval "unset _stack_$1[$_i]"
147
eval "_stack_$1_i=$_i"
0 commit comments