From 0bc99d2e78f9073f4a76a536b4044f5ae4d2e88d Mon Sep 17 00:00:00 2001 From: nicksavers Date: Thu, 18 Sep 2014 10:25:44 +0200 Subject: [PATCH] Make INVALID result in program STOP --- ethereumj-core/src/main/java/org/ethereum/vm/OpCode.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ethereumj-core/src/main/java/org/ethereum/vm/OpCode.java b/ethereumj-core/src/main/java/org/ethereum/vm/OpCode.java index 26246e34..eec094c6 100644 --- a/ethereumj-core/src/main/java/org/ethereum/vm/OpCode.java +++ b/ethereumj-core/src/main/java/org/ethereum/vm/OpCode.java @@ -351,8 +351,7 @@ public enum OpCode { public static OpCode code(byte code) { OpCode op = intToTypeMap.get(code); - if (op == null) - throw new RuntimeException("Illegal operation: " + code); + if (op == null) op = STOP; // invalid operation return op; } }