# HG changeset patch # User frosch # Date 1271516269 0 # Node ID 78fafe2cf7c1db1018865daa4e9b5acd90c4b9fd # Parent 3314e49704e7d3b9823b7d17c5d6e54c347e6440 (svn r19658) -Fix: One could turn transport companies into credit banks. diff --git a/src/landscape.cpp b/src/landscape.cpp --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -604,8 +604,8 @@ /** Clear a big piece of landscape * @param tile end tile of area dragging + * @param flags of operation to conduct * @param p1 start tile of area dragging - * @param flags of operation to conduct * @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 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -97,7 +97,7 @@ 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; }