diff options
Diffstat (limited to 'vm/stack.go')
-rw-r--r-- | vm/stack.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vm/stack.go b/vm/stack.go index a99cc1805..c5c2774db 100644 --- a/vm/stack.go +++ b/vm/stack.go @@ -15,10 +15,11 @@ type stack struct { } func (st *stack) push(d *big.Int) { + stackItem := new(big.Int).Set(d) if len(st.data) > st.ptr { - st.data[st.ptr] = d + st.data[st.ptr] = stackItem } else { - st.data = append(st.data, d) + st.data = append(st.data, stackItem) } st.ptr++ } |