(svn r19684) -Fix [FS#3779]: don't show an error message when trying to give another client an amount of 0 money

This commit is contained in:
yexo 2010-04-20 18:02:08 +00:00
parent dba2a57b0d
commit 879057de25

View File

@ -223,7 +223,7 @@ CommandCost CmdGiveMoney(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
CommandCost amount(EXPENSES_OTHER, min((Money)p1, (Money)20000000LL));
/* You can only transfer funds that is in excess of your loan */
if (c->money - c->current_loan < amount.GetCost() || amount.GetCost() <= 0) return CMD_ERROR;
if (c->money - c->current_loan < amount.GetCost() || amount.GetCost() < 0) return CMD_ERROR;
if (!_networking || !Company::IsValidID((CompanyID)p2)) return CMD_ERROR;
if (flags & DC_EXEC) {