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/ai/api/ai_basestation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ai/api/ai_basestation.cpp') diff --git a/src/ai/api/ai_basestation.cpp b/src/ai/api/ai_basestation.cpp index 30089609c..aea5d52cc 100644 --- a/src/ai/api/ai_basestation.cpp +++ b/src/ai/api/ai_basestation.cpp @@ -38,7 +38,7 @@ { EnforcePrecondition(false, IsValidBaseStation(station_id)); EnforcePrecondition(false, !::StrEmpty(name)); - EnforcePreconditionCustomError(false, ::strlen(name) < MAX_LENGTH_STATION_NAME_BYTES, AIError::ERR_PRECONDITION_STRING_TOO_LONG); + EnforcePreconditionCustomError(false, ::Utf8StringLength(name) < MAX_LENGTH_STATION_NAME_CHARS, AIError::ERR_PRECONDITION_STRING_TOO_LONG); return AIObject::DoCommand(0, station_id, 0, ::Station::IsValidID(station_id) ? CMD_RENAME_STATION : CMD_RENAME_WAYPOINT, name); } -- cgit v1.2.3-54-g00ecf