From 314616727b59b0f89a7d40b4eaf90efefd6e7f65 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 8 Jan 2012 21:51:08 +0000 Subject: [PATCH] (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(+) diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index f56bce0c05..a4c4549beb 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); }