summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-04-17 14:57:49 +0000
committerfrosch <frosch@openttd.org>2010-04-17 14:57:49 +0000
commit77486ee8d2239e8960b38b7266ced39ce478fd33 (patch)
treebf3bbd8f6c462f7e62beecb79e736b46905e3bd7
parent2365a4dea0ffa0eac31193c70680368c4774903d (diff)
downloadopenttd-77486ee8d2239e8960b38b7266ced39ce478fd33.tar.xz
(svn r19658) -Fix: One could turn transport companies into credit banks.
-rw-r--r--src/landscape.cpp2
-rw-r--r--src/misc_cmd.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index a83c42d70..2677014f7 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -604,8 +604,8 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
/** Clear a big piece of landscape
* @param tile end tile of area dragging
- * @param p1 start tile of area dragging
* @param flags of operation to conduct
+ * @param p1 start tile of area dragging
* @param p2 unused
* @param text unused
* @return the cost of this operation or an error
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index 9d1f9c71e..fc4bec9b6 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -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;
}