From d40406b35fd9fcb2b77f22356cd337c23c7a1b36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Anian=20B=C3=BChler?=
 <anian.buehler@reutlingen-university.de>
Date: Wed, 12 May 2021 11:13:11 +0200
Subject: [PATCH] changed int to short (int16) in SimTypeInt

---
 .../ardublock/simulator/simcode/datatypes/SimTypeInt.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/tec/letsgoing/ardublock/simulator/simcode/datatypes/SimTypeInt.java b/src/tec/letsgoing/ardublock/simulator/simcode/datatypes/SimTypeInt.java
index 691cc9f..d7581e0 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;
 	}
 
 }
-- 
GitLab