fix counting of kill instructions in interpreter
authoradam <adam@megacz.com>
Wed, 2 Jan 2008 06:41:11 +0000 (07:41 +0100)
committeradam <adam@megacz.com>
Wed, 2 Jan 2008 06:41:11 +0000 (07:41 +0100)
src/edu/berkeley/fleet/interpreter/Interpreter.java

index 3ae7a10..fc2737b 100644 (file)
@@ -97,7 +97,7 @@ public class Interpreter extends Fleet implements Fleet.WithDynamicShips {
 
         } else if (i instanceof Instruction.Kill) {
             InterpreterPump pump = (InterpreterPump)(((Instruction.Kill)i).pump);
-            ((InstructionPump)pump).kill(((Instruction.Kill)i).count, false);
+            ((InstructionPump)pump).kill(((Instruction.Kill)i).count+1, false);
 
         } else {
             throw new Error("unsupported: " + i.getClass().getName());