1
0
Fork 0

(svn r23516) -Fix [FS#4886]: ScriptSign::BuildSign() returned wrong result if the sign name was too long.

release/1.2
frosch 2011-12-14 20:26:54 +00:00
parent 0a7b49e398
commit dad042585c
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@
{
EnforcePrecondition(INVALID_SIGN, ::IsValidTile(location));
EnforcePrecondition(INVALID_SIGN, !::StrEmpty(text));
EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_SIGN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
EnforcePreconditionCustomError(INVALID_SIGN, ::Utf8StringLength(text) < MAX_LENGTH_SIGN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
if (!ScriptObject::DoCommand(location, 0, 0, CMD_PLACE_SIGN, text, &ScriptInstance::DoCommandReturnSignID)) return INVALID_SIGN;