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 | abc5fd1272051418f8d7a01ce2c9e61d8a51dff5 (patch) | |
tree | cd9b1f30e5a04a6235b23925111ea07647882889 /engine.c | |
parent | 6dba03a819e6a71ec84935515d8b2ed17a45aca8 (diff) | |
download | openttd-abc5fd1272051418f8d7a01ce2c9e61d8a51dff5.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 'engine.c')
-rw-r--r-- | engine.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -887,7 +887,7 @@ int32 CmdRenameEngine(int x, int y, uint32 flags, uint32 p1, uint32 p2) { StringID str; - if (!IsEngineIndex(p1)) return CMD_ERROR; + if (!IsEngineIndex(p1) || _cmd_text[0] == '\0') return CMD_ERROR; str = AllocateNameUnique(_cmd_text, 0); if (str == 0) return CMD_ERROR; |