common/math, core/vm: Un-expose bigEndianByteAt, use correct terms for endianness

This commit is contained in:
Martin Holst Swende
2017-06-06 18:38:38 +02:00
parent 3285a0fda3
commit 1496b3aff6
3 changed files with 19 additions and 18 deletions

View File

@ -258,8 +258,8 @@ func opXor(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stac
func opByte(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
th, val := stack.pop(), stack.peek()
if th.Cmp(common.Big32) < 0 {
b := math.BigEndian32ByteAt(val, int(th.Int64()))
val.SetInt64(int64(b))
b := math.Byte(val, 32, int(th.Int64()))
val.SetUint64(uint64(b))
} else {
val.SetUint64(0)
}