diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3256,7 +3256,7 @@ CommandCost CmdRenameStation(TileIndex t bool reset = StrEmpty(text); if (!reset) { - if (strlen(text) >= MAX_LENGTH_STATION_NAME_BYTES) return CMD_ERROR; + if (Utf8StringLength(text) >= MAX_LENGTH_STATION_NAME_CHARS) return CMD_ERROR; if (!IsUniqueStationName(text)) return_cmd_error(STR_ERROR_NAME_MUST_BE_UNIQUE); }