summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api')
-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 8fd033e9e..4a0b9aefe 100644
--- a/src/script/api/script_town.cpp
+++ b/src/script/api/script_town.cpp
@@ -45,7 +45,7 @@
const char *text = NULL;
if (name != NULL) {
- const char *text = name->GetDecodedText();
+ text = name->GetDecodedText();
EnforcePreconditionEncodedText(false, text);
EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_TOWN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
}