diff --git a/src/main/java/com/laytonsmith/core/ArgumentValidation.java b/src/main/java/com/laytonsmith/core/ArgumentValidation.java index 15eac554f..f03bd479c 100644 --- a/src/main/java/com/laytonsmith/core/ArgumentValidation.java +++ b/src/main/java/com/laytonsmith/core/ArgumentValidation.java @@ -207,7 +207,7 @@ public static double getDouble(Mixed c, Target t) { */ public static float getDouble32(Mixed c, Target t) { double l = getDouble(c, t); - if(l > Float.MAX_VALUE || l < Float.MIN_VALUE) { + if(Math.abs(l) > Float.MAX_VALUE) { throw new CRERangeException("Expecting a 32 bit float, but a larger value was found: " + l, t); } return (float) l;