diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-17 20:58:58 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-17 20:58:58 +0000 |
commit | cb5107f97fa37e0e0225b741c3b542acda359016 (patch) | |
tree | cd9b1f30e5a04a6235b23925111ea07647882889 /station_cmd.c | |
parent | d3ce687daf0e12de8af60ad301417f8cc1800e30 (diff) | |
download | openttd-cb5107f97fa37e0e0225b741c3b542acda359016.tar.xz |
(svn r2345) - Fix: Don't allow stuff to be renamed to nothing if we don't support it. Only valid ones are signs (delete) and waypoints (rename to default).
Diffstat (limited to 'station_cmd.c')
-rw-r--r-- | station_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c index 79ea2ce84..1e99d3eb1 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -2653,7 +2653,7 @@ int32 CmdRenameStation(int x, int y, uint32 flags, uint32 p1, uint32 p2) StringID str,old_str; Station *st; - if (!IsStationIndex(p1)) return CMD_ERROR; + if (!IsStationIndex(p1) || _cmd_text[0] == '\0') return CMD_ERROR; st = GetStation(p1); if (!IsValidStation(st) || !CheckOwnership(st->owner)) return CMD_ERROR; |