Correct swap.

This commit is contained in:
Simon Forman 2021-04-09 17:49:44 -07:00
parent 7957136ac3
commit 8e0472a5ff
1 changed files with 4 additions and 1 deletions

View File

@ -340,7 +340,10 @@ def swap(stack):
(a1 a2 -- a2 a1)
"""
(a2, (a1, s23)) = stack
try:
(a2, (a1, s23)) = stack
except ValueError:
raise StackUnderflowError('Not enough values on stack.')
return (a1, (a2, s23))