diff options
author | rubidium <rubidium@openttd.org> | 2013-06-27 19:57:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-06-27 19:57:41 +0000 |
commit | 19eca468fcfbd8f15cd61cfd54a6971c0cbd3039 (patch) | |
tree | 933e198011751ed6862511f3835453e49307a835 /src/script/api/script_object.cpp | |
parent | 8463335b009a95636a40dbd5b3f7400a98b76870 (diff) | |
download | openttd-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_object.cpp')
-rw-r--r-- | src/script/api/script_object.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index 6615b58de..6d4140b2a 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -287,6 +287,8 @@ ScriptObject::ActiveInstance::~ActiveInstance() return false; } + assert(StrEmpty(text) || (GetCommandFlags(cmd) & CMD_STR_CTRL) != 0 || StrValid(text, text + strlen(text))); + /* Set the default callback to return a true/false result of the DoCommand */ if (callback == NULL) callback = &ScriptInstance::DoCommandReturn; |