summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_basestation.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}