diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-12 08:12:28 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-12 08:12:28 +0800 |
commit | 31a95151c9fb95c8527e419347556f455aebd1cb (patch) | |
tree | 280129838b40b738699529cada9bc7c4a32b178a /vm/stack.go | |
parent | 96496888edd290c4c20d52a40693e3a6a2c2479e (diff) | |
download | go-tangerine-31a95151c9fb95c8527e419347556f455aebd1cb.tar.gz go-tangerine-31a95151c9fb95c8527e419347556f455aebd1cb.tar.zst go-tangerine-31a95151c9fb95c8527e419347556f455aebd1cb.zip |
updated rnd vm test => state test
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++ } |