diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-16 04:11:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-16 04:11:05 +0800 |
commit | 399256b38403f2e95312250d49fca3cada8956b8 (patch) | |
tree | 25ee8bb6334377fb18a39463c8bd85ea7878f641 /ethvm/stack.go | |
parent | 33a0dec8a157b9687ca6038f4deb011f3f1f7bdc (diff) | |
download | go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.gz go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.bz2 go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.lz go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.xz go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.zst go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.zip |
VM execution fixes
Refactoring caused executing issues
Diffstat (limited to 'ethvm/stack.go')
-rw-r--r-- | ethvm/stack.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethvm/stack.go b/ethvm/stack.go index 82dd612c2..4ac023fb9 100644 --- a/ethvm/stack.go +++ b/ethvm/stack.go @@ -65,13 +65,13 @@ func (st *Stack) Peekn() (*big.Int, *big.Int) { } func (st *Stack) Swapn(n int) (*big.Int, *big.Int) { - st.data[n], st.data[0] = st.data[0], st.data[n] + st.data[len(st.data)-n], st.data[len(st.data)-1] = st.data[len(st.data)-1], st.data[len(st.data)-n] - return st.data[n], st.data[0] + return st.data[len(st.data)-n], st.data[len(st.data)-1] } func (st *Stack) Dupn(n int) *big.Int { - st.Push(st.data[n]) + st.Push(st.data[len(st.data)-n]) return st.Peek() } |