From ab9cc74ba5cdbb6784f26d354ab4999d605a5ebb Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 5 Dec 2010 22:24:20 +0000 Subject: (svn r21410) -Codechange: limit engine name by amount of characters, not bytes --- src/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine.cpp') diff --git a/src/engine.cpp b/src/engine.cpp index 64ff67040..8e19a2990 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -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); } -- cgit v1.2.3-54-g00ecf