OpenTTD

Tasklist

FS#1174 - cannot give money if I have too much

Attached to Project: OpenTTD
Opened by Zdeněk Sojka (SmatZ) - Friday, 31 August 2007, 15:34 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

r11015

If a company has too much money (over 1<<32 ?), it cannot give money to other companies.

problem is likely there:
main_gui.cpp : 93
Money money = min(p->player_money - p->current_loan, atoi(str) / _currency->rate);

the first parameter is downgraded to int32 in the min() function (it is just my guess)

I am sorry I am not attaching any patch, I don't know the most nice and general way to fix that.

Attached savegame - start a server, join second client and try to give him money.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Friday, 31 August 2007, 17:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r11020.

Loading...