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…
Reference in New Issue