summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 4b80d0cd4..805f46d29 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -291,7 +291,7 @@ CommandCost CmdBuildLock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
*/
CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
- if (p1 >= MapSize()) return CMD_ERROR;
+ if (p1 >= MapSize() || p2 > 2) return CMD_ERROR;
/* Outside of the editor you can only build canals, not oceans */
if (p2 != 0 && _game_mode != GM_EDITOR) return CMD_ERROR;