(svn r21409) -Codechange: limit depot name by amount of characters, not bytes

This commit is contained in:
rubidium
2010-12-05 22:24:04 +00:00
parent 9a18050646
commit 091263317e
3 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ CommandCost CmdRenameDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
bool reset = StrEmpty(text);
if (!reset) {
if (strlen(text) >= MAX_LENGTH_DEPOT_NAME_BYTES) return CMD_ERROR;
if (Utf8StringLength(text) >= MAX_LENGTH_DEPOT_NAME_CHARS) return CMD_ERROR;
if (!IsUniqueDepotName(text)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE);
}