diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/string/Substring.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/string/Substring.java index 74202855..8624cae1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/string/Substring.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/string/Substring.java @@ -80,7 +80,7 @@ public class Substring implements SpecialCommand { } else { result = new Value.StringValue(v1.asString().substring((int) v2.asLong())); } - } catch (ArrayIndexOutOfBoundsException e) { + } catch (ArrayIndexOutOfBoundsException | StringIndexOutOfBoundsException e) { result = new Value.StringValue(""); } scriptExecutor.getLocalVariables().putValue(resultName, result);