# HG changeset patch # User rubidium # Date 2013-06-30 15:59:10 # Node ID d73c2abb61c033c7a59c05d7e320e6b2b114be04 # Parent bac281e17d462a5f59d7918a6d9bc2e1b46093d4 (svn r25544) -Fix [FS#5625] (r25488, r25486): [GS] The checks and validations for setting the extra text in the town window became too stringent diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -43,10 +43,9 @@ CCountedPtr counter(text); EnforcePrecondition(false, text != NULL); - const char *encoded_text = text->GetDecodedText(); + const char *encoded_text = text->GetEncodedText(); EnforcePreconditionEncodedText(false, encoded_text); EnforcePrecondition(false, IsValidTown(town_id)); - EnforcePreconditionCustomError(false, ::Utf8StringLength(encoded_text) < MAX_LENGTH_TOWN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG); return ScriptObject::DoCommand(::Town::Get(town_id)->xy, town_id, 0, CMD_TOWN_SET_TEXT, encoded_text); }