aboutsummaryrefslogtreecommitdiff
path: root/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'stack.go')
-rw-r--r--stack.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/stack.go b/stack.go
index ecae058..aed4e6a 100644
--- a/stack.go
+++ b/stack.go
@@ -17,9 +17,8 @@ func (s *stack) push(v uint16) {
}
func (s *stack) pop() uint16 {
- v := s.get()
- s.move(-1)
- return v
+ defer s.move(-1)
+ return s.get()
}
func (s *stack) get() uint16 {