From 766d1c4091caa6b7f24dcd7dfa76784e20382c35 Mon Sep 17 00:00:00 2001 From: coffeepots Date: Tue, 18 Sep 2018 20:57:19 +0100 Subject: [PATCH] Temp fix for int32.high returning zero --- 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 81a490610..68e65113d 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -193,7 +193,7 @@ op sha3, inline = true, startPos, length: ## 0x20, Compute Keccak-256 hash. let (pos, len) = (startPos.toInt, length.toInt) - if pos < 0 or len < 0 or pos > int32.high: + if pos < 0 or len < 0 or pos > 2147483648: raise newException(OutOfBoundsRead, "Out of bounds memory access") computation.gasMeter.consumeGas(