diff --git a/src/tec/letsgoing/ardublock/simulator/simcode/datatypes/SimTypeInt.java b/src/tec/letsgoing/ardublock/simulator/simcode/datatypes/SimTypeInt.java index 691cc9f89fd0a04792d38a13a2f71f5e94a9a366..d7581e02148e541e106ba7d46a69c4d72c20da9f 100644 --- a/src/tec/letsgoing/ardublock/simulator/simcode/datatypes/SimTypeInt.java +++ b/src/tec/letsgoing/ardublock/simulator/simcode/datatypes/SimTypeInt.java @@ -13,11 +13,11 @@ import tec.letsgoing.ardublock.simulator.simcode.SimCode; * */ public class SimTypeInt extends SimCode { - private int value = 0; + private short value = 0; private SimCode followBlock; public SimTypeInt(int _value) { - value = _value; + value = (short) _value; } public SimTypeInt(SimCode block) { @@ -28,7 +28,7 @@ public class SimTypeInt extends SimCode { public SimTypeInt run(Arduino _arduino, SimCode functionHead) { if (followBlock instanceof SimCode) { SimTypeInt ret = (SimTypeInt) followBlock.run(_arduino, functionHead); - value = ret.getValue(); + value = (short) ret.getValue(); } return new SimTypeInt(value); @@ -40,7 +40,7 @@ public class SimTypeInt extends SimCode { } public int getValue() { - return value; + return (int) value; } }