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 | |
parent | 96496888edd290c4c20d52a40693e3a6a2c2479e (diff) | |
download | dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.gz dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.bz2 dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.lz dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.xz dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.zst dexon-31a95151c9fb95c8527e419347556f455aebd1cb.zip |
updated rnd vm test => state test
Diffstat (limited to 'vm')
-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++ } |