diff --git a/src/main/java/ca/rttv/chatcalc/ChatCalc.java b/src/main/java/ca/rttv/chatcalc/ChatCalc.java index 3d1aec0..bcbbda0 100644 --- a/src/main/java/ca/rttv/chatcalc/ChatCalc.java +++ b/src/main/java/ca/rttv/chatcalc/ChatCalc.java @@ -25,6 +25,9 @@ public static boolean tryParse(TextFieldWidget field) { int cursor = field.getCursor(); String text = ChatHelper.getWord(originalText, cursor); String[] split = text.split("="); + if (split.length == 0) { + return false; + } if (split.length == 2) { if (Config.JSON.has(split[0])) { Config.JSON.addProperty(split[0], split[1]);