(svn r21410) -Codechange: limit engine name by amount of characters, not bytes

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

View File

@@ -832,7 +832,7 @@ CommandCost CmdRenameEngine(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
bool reset = StrEmpty(text);
if (!reset) {
if (strlen(text) >= MAX_LENGTH_ENGINE_NAME_BYTES) return CMD_ERROR;
if (Utf8StringLength(text) >= MAX_LENGTH_ENGINE_NAME_CHARS) return CMD_ERROR;
if (!IsUniqueEngineName(text)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE);
}