The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: RESTRICTED ACCOUNT on January 30, 2020, 09:32:06 AM

Title: After the decimal point on chart always shows .00
Post by: RESTRICTED ACCOUNT on January 30, 2020, 09:32:06 AM
It is weird that the decimals are always 0 in charts, even though other dialogs displayed the decimals correctly.
It looks like the data in the chart and other dialogs are inconsistent.

So I was looking at the gui_chart.cc,
if the chart type is money, divide sint64 by 100, then assign to another sint64 and convert it to double. Therefore, two decimal places have been truncated.
In this case, there is no point in displaying decimal places.
Title: Re: After the decimal point on chart always shows .00
Post by: Phystam on January 30, 2020, 06:27:16 PM
Probably we have to convert sint64 to double, and divide it by 100.
Title: Re: After the decimal point on chart always shows .00
Post by: prissi on January 31, 2020, 01:35:23 PM
Thank you, should be fixed in r8891.
Title: Re: After the decimal point on chart always shows .00
Post by: RESTRICTED ACCOUNT on February 02, 2020, 02:35:45 PM
Thank you for fixing!  :)