(svn r25555) -Fix [FS#5632]: [Script] Texts from scripts were not validated before they were shown, causing an assertion to trigger

This commit is contained in:
rubidium
2013-07-04 16:36:47 +00:00
parent 76566fde5b
commit 4c443bce5c
5 changed files with 24 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
#include "../debug.h"
#include "squirrel_std.hpp"
#include "../fileio_func.h"
#include "../string_func.h"
#include <sqstdaux.h>
#include <../squirrel/sqpcheader.h>
#include <../squirrel/sqvm.h>
@@ -252,6 +253,7 @@ bool Squirrel::CallStringMethodStrdup(HSQOBJECT instance, const char *method_nam
if (!this->CallMethod(instance, method_name, &ret, suspend)) return false;
if (ret._type != OT_STRING) return false;
*res = strdup(ObjectToString(&ret));
ValidateString(*res);
return true;
}