Skip to content

Commit

Permalink
Fix ArgumentValidation.getDouble32() from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Apr 7, 2024
1 parent e0ce000 commit 715e720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/laytonsmith/core/ArgumentValidation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 715e720

Please sign in to comment.