From df963509f6beede3b30c7e3d55422a8fb2971613 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 8 Jan 2012 21:51:08 +0000 Subject: (svn r23778) -Fix [FS#4957]: trim all control codes and the likes from strings being passed into the AI. If the AI would be displaying them later we would be showing those control codes as question marks. --- src/script/api/script_object.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/script') diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index f56bce0c0..a4c4549be 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -239,6 +239,7 @@ ScriptObject::ActiveInstance::~ActiveInstance() { char buffer[64]; ::GetString(buffer, string, lastof(buffer)); + ::str_validate(buffer, lastof(buffer), SVS_NONE); return ::strdup(buffer); } -- cgit v1.2.3-70-g09d2