aboutsummaryrefslogtreecommitdiff
path: root/pkg/pointer/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/pointer/stack.go')
-rw-r--r--pkg/pointer/stack.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/pointer/stack.go b/pkg/pointer/stack.go
index 1832dbb..ba51c7c 100644
--- a/pkg/pointer/stack.go
+++ b/pkg/pointer/stack.go
@@ -23,6 +23,9 @@ func (s *Stack) Clear() {
func (s *Stack) Duplicate() {
if s.height > 0 {
s.Push(s.data[s.height-1])
+ } else {
+ s.Push(0)
+ s.Push(0)
}
}