summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terraform_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index a34471a5d..fd91f4d3a 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -422,6 +422,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
const Company *c = Company::GetIfValid(_current_company);
int limit = (c == NULL ? INT32_MAX : GB(c->terraform_limit, 16, 16));
+ if (limit == 0) return_cmd_error(STR_ERROR_TERRAFORM_LIMIT_REACHED);
TileArea ta(tile, p1);
TileIterator *iter = HasBit(p2, 0) ? (TileIterator *)new DiagonalTileIterator(tile, p1) : new OrthogonalTileIterator(ta);