Skip to content

Commit ea493b2

Browse files
authored
Removed error handling of type conversion
Wasn't needed. We don't check for distance == 0, as someone could purposefully push 0 to do a NOP
1 parent 915f616 commit ea493b2

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/kOS.Safe/Compilation/Opcode.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,8 +1120,6 @@ public override void Execute(ICpu cpu)
11201120
{
11211121
object popval = cpu.PopValueArgument();
11221122
int distance = Convert.ToInt32(popval);
1123-
if (distance == null)
1124-
throw new KOSCastException(popval.GetType(), typeof(ScalarIntValue));
11251123
DeltaInstructionPointer = distance;
11261124
}
11271125
}

0 commit comments

Comments
 (0)