(svn r21411) -Codechange: limit group name by amount of characters, not bytes

This commit is contained in:
rubidium
2010-12-05 22:24:34 +00:00
parent 4d6cd55877
commit 48101ae6a7
4 changed files with 4 additions and 4 deletions

View File

@@ -181,7 +181,7 @@ CommandCost CmdRenameGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
bool reset = StrEmpty(text);
if (!reset) {
if (strlen(text) >= MAX_LENGTH_GROUP_NAME_BYTES) return CMD_ERROR;
if (Utf8StringLength(text) >= MAX_LENGTH_GROUP_NAME_CHARS) return CMD_ERROR;
if (!IsUniqueGroupName(text)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE);
}