diff options
Diffstat (limited to 'src/3rdparty/squirrel/squirrel/sqapi.cpp')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqapi.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqapi.cpp b/src/3rdparty/squirrel/squirrel/sqapi.cpp index 1f523e71c..179df117f 100644 --- a/src/3rdparty/squirrel/squirrel/sqapi.cpp +++ b/src/3rdparty/squirrel/squirrel/sqapi.cpp @@ -1,6 +1,9 @@ /* see copyright notice in squirrel.h */ + +#include "../../../stdafx.h" + #include <squirrel.h> #include "sqpcheader.h" #include "sqvm.h" @@ -14,6 +17,10 @@ #include "sqfuncstate.h" #include "sqclass.h" +#include "../../../string_func.h" + +#include "../../../safeguards.h" + bool sq_aux_gettypedarg(HSQUIRRELVM v,SQInteger idx,SQObjectType type,SQObjectPtr **o) { *o = &stack_get(v,idx); @@ -40,8 +47,9 @@ SQInteger sq_aux_throwobject(HSQUIRRELVM v,SQObjectPtr &e) SQInteger sq_aux_invalidtype(HSQUIRRELVM v,SQObjectType type) { - sprintf(_ss(v)->GetScratchPad(100), "unexpected type %s", IdType2Name(type)); - return sq_throwerror(v, _ss(v)->GetScratchPad(-1)); + char buf[100]; + seprintf(buf, lastof(buf), "unexpected type %s", IdType2Name(type)); + return sq_throwerror(v, buf); } HSQUIRRELVM sq_open(SQInteger initialstacksize) |