summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/town_cmd.c b/town_cmd.c
index 8eb782d9e..498c2154b 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -1447,7 +1447,7 @@ int32 CmdRenameTown(int x, int y, uint32 flags, uint32 p1, uint32 p2)
StringID str;
Town *t;
- if (!IsTownIndex(p1)) return CMD_ERROR;
+ if (!IsTownIndex(p1) || _cmd_text[0] == '\0') return CMD_ERROR;
t = GetTown(p1);