OpenTTD

Tasklist

FS#6498 - Money bug in Detailed performance rating window

Attached to Project: OpenTTD
Opened by Ricardo (Samu) - Sunday, 14 August 2016, 17:36 GMT
Type Bug
Category Interface
Status New
Assigned To No-one
Operating System Windows
Severity Very Low
Priority Normal
Reported Version other
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

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.
This task depends upon

Comment by Grzegorz Duczyński (adf88) - Thursday, 25 August 2016, 16:20 GMT
"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?
Comment by Alberth (Alberth) - Monday, 03 October 2016, 16:01 GMT
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.

Loading...