aboutsummaryrefslogtreecommitdiff
path: root/stack.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-15 23:41:11 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-15 23:41:11 +0100
commit78526ca97410f4ae2ed727243e28b182a1dc1633 (patch)
treea4f1819653b95362b7c94e626866e6ba71e0f0c0 /stack.go
parent17e0b07b1a328a54c8059bc1861a805e85a232ef (diff)
...
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 {