summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-04-17 13:31:41 +0000
committerfrosch <frosch@openttd.org>2010-04-17 13:31:41 +0000
commit75d4bc947ddbb92ecf660d9a9858c854d5e34a15 (patch)
treeb218a672a78b894388373d2e700e6ad6ebe75b63 /src/water_cmd.cpp
parent184fa43df2e14c73162e641bc9bc83e403f069ed (diff)
downloadopenttd-75d4bc947ddbb92ecf660d9a9858c854d5e34a15.tar.xz
(svn r19654) -Codechange: Use Extract<> in more places.
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;