(svn r24982) -Fix [FS#5465]: [Script] Crash when passing too many parameters
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
EnforcePrecondition(false, name != NULL);
|
||||
const char *text = name->GetEncodedText();
|
||||
EnforcePrecondition(false, !::StrEmpty(text));
|
||||
EnforcePreconditionEncodedText(false, text);
|
||||
EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_COMPANY_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
|
||||
|
||||
return ScriptObject::DoCommand(0, 0, 0, CMD_RENAME_COMPANY, text);
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
EnforcePrecondition(false, name != NULL);
|
||||
const char *text = name->GetEncodedText();
|
||||
EnforcePrecondition(false, !::StrEmpty(text));
|
||||
EnforcePreconditionEncodedText(false, text);
|
||||
|
||||
return ScriptObject::DoCommand(0, 0, 0, CMD_RENAME_PRESIDENT, text);
|
||||
}
|
||||
|
Reference in New Issue
Block a user