mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-26 07:59: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:
@@ -129,6 +129,8 @@ int32 CmdChangeCompanyName(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
StringID str;
|
||||
Player *p;
|
||||
|
||||
if (_cmd_text[0] == '\0') return CMD_ERROR;
|
||||
|
||||
str = AllocateNameUnique(_cmd_text, 4);
|
||||
if (str == 0) return CMD_ERROR;
|
||||
|
||||
@@ -153,6 +155,8 @@ int32 CmdChangePresidentName(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
StringID str;
|
||||
Player *p;
|
||||
|
||||
if (_cmd_text[0] == '\0') return CMD_ERROR;
|
||||
|
||||
str = AllocateNameUnique(_cmd_text, 4);
|
||||
if (str == 0) return CMD_ERROR;
|
||||
|
||||
|
Reference in New Issue
Block a user