diff --git a/src/com/serotonin/mango/rt/dataImage/types/BinaryValue.java b/src/com/serotonin/mango/rt/dataImage/types/BinaryValue.java index 0dbbc407f1..dfaa11c8bb 100644 --- a/src/com/serotonin/mango/rt/dataImage/types/BinaryValue.java +++ b/src/com/serotonin/mango/rt/dataImage/types/BinaryValue.java @@ -28,13 +28,13 @@ public class BinaryValue extends MangoValue implements Comparable { public static final BinaryValue ONE = new BinaryValue(true); public static BinaryValue parseBinary(String s) { + if(s==null) return ZERO; s = s.trim().toLowerCase(); - if(s == null || s.equals("0") || s.equals("false")) { - return ZERO; - } else if(s.equals("1") || s.equals("true")) { + if(s.equals("1") || s.equals("true")) { return ONE; + } else { + return ZERO; } - throw new NumberFormatException("Value is not a binary."); } private final boolean value;