summaryrefslogtreecommitdiff
path: root/src/script/api/script_town.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/script_town.cpp')
-rw-r--r--src/script/api/script_town.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp
index 5ade6f40f..cb8fb62d6 100644
--- a/src/script/api/script_town.cpp
+++ b/src/script/api/script_town.cpp
@@ -43,7 +43,7 @@
CCountedPtr<Text> counter(text);
EnforcePrecondition(false, text != NULL);
- const char *encoded_text = text->GetEncodedText();
+ const char *encoded_text = text->GetDecodedText();
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);