From 44d1c5534757a284b528dfe30ba227675234b4e4 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 5 Dec 2010 22:25:36 +0000 Subject: (svn r21415) -Codechange: limit station/waypoint name by amount of characters, not bytes --- src/station_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 9936c6a8c..bea52f977 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3256,7 +3256,7 @@ CommandCost CmdRenameStation(TileIndex tile, DoCommandFlag flags, uint32 p1, uin 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); } -- cgit v1.2.3-70-g09d2