From ff52d75fc084bd98befc6005ea731f9fca3bb388 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Thu, 9 Aug 2018 17:15:39 +0100 Subject: [PATCH] Fix overflowing int in 32 bit --- nimbus/vm/interpreter/opcodes_impl.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimbus/vm/interpreter/opcodes_impl.nim b/nimbus/vm/interpreter/opcodes_impl.nim index 4cec15e19..407fad8a2 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -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: