summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index ecd4adf5e..056e0d620 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2813,7 +2813,7 @@ static bool IsUniqueStationName(const char *name)
*/
CommandCost CmdRenameStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
- if (!IsValidStationID(p1))
+ if (!IsValidStationID(p1)) return CMD_ERROR;
if (StrEmpty(_cmd_text) || strlen(_cmd_text) >= MAX_LENGTH_STATION_NAME_BYTES) return CMD_ERROR;
Station *st = GetStation(p1);