diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2018-01-15 23:41:11 +0100 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2018-01-15 23:41:11 +0100 |
commit | 78526ca97410f4ae2ed727243e28b182a1dc1633 (patch) | |
tree | a4f1819653b95362b7c94e626866e6ba71e0f0c0 /stack.go | |
parent | 17e0b07b1a328a54c8059bc1861a805e85a232ef (diff) |
...
Diffstat (limited to 'stack.go')
-rw-r--r-- | stack.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 { |