diff --git a/core/src/mindustry/core/UI.java b/core/src/mindustry/core/UI.java index 7cd9e79303..5904aed9be 100644 --- a/core/src/mindustry/core/UI.java +++ b/core/src/mindustry/core/UI.java @@ -595,8 +595,9 @@ public class UI implements ApplicationListener, Loadable{ } public static String formatAmount(long number){ - //prevent overflow - if(number == Long.MIN_VALUE) number ++; + //prevent things like bars displaying erroneous representations of casted infinities + if(number == Long.MAX_VALUE) return "∞"; + if(number == Long.MIN_VALUE) return "-∞"; long mag = Math.abs(number); String sign = number < 0 ? "-" : "";