From 75d4bc947ddbb92ecf660d9a9858c854d5e34a15 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 17 Apr 2010 13:31:41 +0000 Subject: (svn r19654) -Codechange: Use Extract<> in more places. --- src/water_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/water_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf