(svn r19658) -Fix: One could turn transport companies into credit banks.

This commit is contained in:
frosch
2010-04-17 14:57:49 +00:00
parent bf721f39af
commit 5b481e6f4a
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ CommandCost CmdDecreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
loan -= loan % LOAN_INTERVAL;
break;
case 2: // Repay the given amount of loan
if (p1 % LOAN_INTERVAL != 0 || (int32)p1 < LOAN_INTERVAL) return CMD_ERROR; // Invalid amount to loan
if (p1 % LOAN_INTERVAL != 0 || (int32)p1 < LOAN_INTERVAL || p1 > c->current_loan) return CMD_ERROR; // Invalid amount to loan
loan = p1;
break;
}