Make INVALID result in program STOP

This commit is contained in:
nicksavers 2014-09-18 10:25:44 +02:00
parent 3873dc98b5
commit 0bc99d2e78

View File

@ -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;
}
}