mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-09 02:35:08 +00:00
Fix overflowing int in 32 bit
This commit is contained in:
parent
5cd81ef3ac
commit
ff52d75fc0
@ -219,7 +219,7 @@ proc writePaddedResult(mem: var Memory,
|
|||||||
paddingValue = 0.byte) =
|
paddingValue = 0.byte) =
|
||||||
mem.extend(memPos, len)
|
mem.extend(memPos, len)
|
||||||
|
|
||||||
let dataEndPosition = dataPos + len - 1
|
let dataEndPosition = dataPos.int64 + len - 1
|
||||||
if dataEndPosition < data.len:
|
if dataEndPosition < data.len:
|
||||||
mem.write(memPos, data[dataPos .. dataEndPosition])
|
mem.write(memPos, data[dataPos .. dataEndPosition])
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user