aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-12 08:12:28 +0800
committerobscuren <geffobscura@gmail.com>2015-03-12 08:12:28 +0800
commit31a95151c9fb95c8527e419347556f455aebd1cb (patch)
tree280129838b40b738699529cada9bc7c4a32b178a /vm
parent96496888edd290c4c20d52a40693e3a6a2c2479e (diff)
downloaddexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.gz
dexon-31a95151c9fb95c8527e419347556f455aebd1cb.tar.zst
dexon-31a95151c9fb95c8527e419347556f455aebd1cb.zip
updated rnd vm test => state test
Diffstat (limited to 'vm')
-rw-r--r--vm/stack.go5
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++
}