mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 21:19:10 +00:00
(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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user