summaryrefslogtreecommitdiff
path: root/src/script/api/script_company.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-27 19:57:41 +0000
committerrubidium <rubidium@openttd.org>2013-06-27 19:57:41 +0000
commit19eca468fcfbd8f15cd61cfd54a6971c0cbd3039 (patch)
tree933e198011751ed6862511f3835453e49307a835 /src/script/api/script_company.cpp
parent8463335b009a95636a40dbd5b3f7400a98b76870 (diff)
downloadopenttd-19eca468fcfbd8f15cd61cfd54a6971c0cbd3039.tar.xz
(svn r25488) -Fix [FS#5613]: do not send encoded texts to names, but decode them into a plain C string and then pass them on
Diffstat (limited to 'src/script/api/script_company.cpp')
-rw-r--r--src/script/api/script_company.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp
index 99fe34376..2f06fd69d 100644
--- a/src/script/api/script_company.cpp
+++ b/src/script/api/script_company.cpp
@@ -43,7 +43,7 @@
CCountedPtr<Text> counter(name);
EnforcePrecondition(false, name != NULL);
- const char *text = name->GetEncodedText();
+ const char *text = name->GetDecodedText();
EnforcePreconditionEncodedText(false, text);
EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_COMPANY_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
@@ -64,7 +64,7 @@
CCountedPtr<Text> counter(name);
EnforcePrecondition(false, name != NULL);
- const char *text = name->GetEncodedText();
+ const char *text = name->GetDecodedText();
EnforcePreconditionEncodedText(false, text);
EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_PRESIDENT_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);