diff options
author | rubidium <rubidium@openttd.org> | 2013-06-30 15:59:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-06-30 15:59:10 +0000 |
commit | 1ff95f36bfb04239d9b7515bb7fa379ef42ebfd1 (patch) | |
tree | 1f71fcc95b4ba0e783bf2ae03c7f25adba9029ca /src | |
parent | c1bf3122ad2ae2fd4d8f2bf835fbf9ab21b8caf4 (diff) | |
download | openttd-1ff95f36bfb04239d9b7515bb7fa379ef42ebfd1.tar.xz |
(svn r25544) -Fix [FS#5625] (r25488, r25486): [GS] The checks and validations for setting the extra text in the town window became too stringent
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/script_town.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp index cb8fb62d6..fa4b9c0c7 100644 --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -43,10 +43,9 @@ CCountedPtr<Text> 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); } |