(svn r21411) -Codechange: limit group name by amount of characters, not bytes

This commit is contained in:
rubidium
2010-12-05 22:24:34 +00:00
parent ab9cc74ba5
commit 768da4b48f
4 changed files with 4 additions and 4 deletions

View File

@@ -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);
}