aboutsummaryrefslogtreecommitdiffstats
path: root/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack.c')
-rw-r--r--stack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stack.c b/stack.c
index 617e621..e1f0281 100644
--- a/stack.c
+++ b/stack.c
@@ -61,6 +61,9 @@ void stack_roll(stack *s) {
s->start[i] = s->start[i+1];
}
s->start[i] = newtop;
+ } else {
+ // no item found
+ stack_push(s, 0);
}
}