1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(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).

This commit is contained in:
Darkvater
2005-05-17 20:58:58 +00:00
parent d3ce687daf
commit cb5107f97f
5 changed files with 8 additions and 4 deletions

View File

@@ -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;