Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Money bug in Detailed performance rating window #6498

Closed
DorpsGek opened this issue Aug 14, 2016 · 3 comments
Closed

Money bug in Detailed performance rating window #6498

DorpsGek opened this issue Aug 14, 2016 · 3 comments
Labels
bug Something isn't working component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers

Comments

@DorpsGek
Copy link
Member

Samu opened the ticket and wrote:

reported version is 1.6.1

I think I found a bug in "Detailed performance rating" window. The amount of money in the bank says £2,147 M, but on this savegame, NoNoCAB already has £3,2 M.

Attachments

Reported version: other
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/6498
@DorpsGek
Copy link
Member Author

adf88 wrote:

"2,147 M" This number seems familiar ... 2^31 = 2 147 483 648
Looks like a bug, indeed.

//EDIT
I found it.
http://hg.openttd.org/trunk.hg/file/4051bab2730c/src/economy.cpp# l245
All scores are stored in 'int' variables.

So what's the decision? Turn into int64?


This comment was imported from FlySpray: https://bugs.openttd.org/task/6498#comment14259

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 3, 2016

Alberth wrote:

Attached the screenshot of the ratings window, to avoid having to download and run the game.

It shows "100%" on required amount of money, so the rating is displayed correctly, it's just the displayed user money amount that does not match with the real user amount.
However, both 2^31 and the real amount are above the required amount. Using either will work.

The data only seems to be used for the window (and is not stored somewhere, it seems), so it's probably fine to extend the size of the numbers.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6498#comment14282

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
@TrueBrain TrueBrain added good first issue Good for newcomers bug Something isn't working and removed bug from FlySpray labels Apr 11, 2018
@nielsmh
Copy link
Contributor

nielsmh commented Nov 1, 2018

Can confirm this is still present.

nielsmh added a commit to nielsmh/OpenTTD that referenced this issue Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants