mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-02 15:24:01 +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) =
|
||||
mem.extend(memPos, len)
|
||||
|
||||
let dataEndPosition = dataPos + len - 1
|
||||
let dataEndPosition = dataPos.int64 + len - 1
|
||||
if dataEndPosition < data.len:
|
||||
mem.write(memPos, data[dataPos .. dataEndPosition])
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user