Food over 2.1Million kcal shows negative on HUD


Xentik
  • Branch: Live Branch Fixed

As seen below, having food stored over 2.1mil kcal gives a negative value in the upper left display, but shows properly in the Edible list on the right. The upper left shows that number always if the total edible calories exceeds 2.1 mil kcal, i.e. it doesn't change as the number continues to increase above that. Given the number in the upper left is the minimum in a signed 32-bit integer and stays that way regardless of how, I'd assume the number is stored  is being converted to a 32-bit number for display in the upper left, instead of as a signed 64-bit.

LNG Produced.jpg


Steps to Reproduce
Produce food in excess of 2.1 mil kcal. Upper left display of kcal available will become fixed at -2^31 as long as kcal > than some limit (guessing 2^31-1). Updates correctly when food drops below limit, and shows negative number again if above limit.


User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

I'm astonished by the amount of food you have!! It's been a struggle for me since the calories for the meal lice was reduced.

 

Share this comment


Link to comment
Share on other sites

Changed Status to Fixed

So I believe this is not an overflow issue but rather a manifestation of the NaN calories bug that has been making the rounds - For example:

I also tested having a large number of calories and got up to 640 mil kcals without seeing any display errors. Once the next patch goes out, if you're still see this issue, feel free to re-open this bug. Thanks!

  • Thanks 2

Share this comment


Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now