diff options
Diffstat (limited to 'src/script/api/script_company.cpp')
-rw-r--r-- | src/script/api/script_company.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index 8dea4c22e..99fe34376 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -66,6 +66,7 @@ EnforcePrecondition(false, name != NULL); const char *text = name->GetEncodedText(); EnforcePreconditionEncodedText(false, text); + EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_PRESIDENT_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG); return ScriptObject::DoCommand(0, 0, 0, CMD_RENAME_PRESIDENT, text); } |