diff options
author | yexo <yexo@openttd.org> | 2010-04-20 18:02:08 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-04-20 18:02:08 +0000 |
commit | 879057de252056df7c295e161664cb7ccac70798 (patch) | |
tree | 36cb0b4c14860b538fab794f9790cd3490c0b16b | |
parent | dba2a57b0d797bb9cbae67200340f69f7ec665fd (diff) | |
download | openttd-879057de252056df7c295e161664cb7ccac70798.tar.xz |
(svn r19684) -Fix [FS#3779]: don't show an error message when trying to give another client an amount of 0 money
-rw-r--r-- | src/misc_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index fc4bec9b6..fe9bc9fde 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -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) { |