updated rnd vm test => state test

This commit is contained in:
obscuren
2015-03-12 01:12:28 +01:00
parent 96496888ed
commit 31a95151c9
2 changed files with 92 additions and 31 deletions

View File

@ -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++
}