summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-05 22:24:34 +0000
committerrubidium <rubidium@openttd.org>2010-12-05 22:24:34 +0000
commit768da4b48f8c70177cb5dfc77a30a23a98a3ae05 (patch)
treee1dfd4ae5d33031df1ada23e834fa6c029824979 /src/ai/api
parentab9cc74ba5cdbb6784f26d354ab4999d605a5ebb (diff)
downloadopenttd-768da4b48f8c70177cb5dfc77a30a23a98a3ae05.tar.xz
(svn r21411) -Codechange: limit group name by amount of characters, not bytes
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_group.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_group.cpp b/src/ai/api/ai_group.cpp
index 5974132c9..abfee1286 100644
--- a/src/ai/api/ai_group.cpp
+++ b/src/ai/api/ai_group.cpp
@@ -52,7 +52,7 @@
{
EnforcePrecondition(false, IsValidGroup(group_id));
EnforcePrecondition(false, !::StrEmpty(name));
- EnforcePreconditionCustomError(false, ::strlen(name) < MAX_LENGTH_GROUP_NAME_BYTES, AIError::ERR_PRECONDITION_STRING_TOO_LONG);
+ EnforcePreconditionCustomError(false, ::Utf8StringLength(name) < MAX_LENGTH_GROUP_NAME_CHARS, AIError::ERR_PRECONDITION_STRING_TOO_LONG);
return AIObject::DoCommand(0, group_id, 0, CMD_RENAME_GROUP, name);
}