summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/squirrel/squirrel/sqapi.cpp1
-rw-r--r--src/3rdparty/squirrel/squirrel/sqclosure.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqapi.cpp b/src/3rdparty/squirrel/squirrel/sqapi.cpp
index a1c91e567..37d4f0c79 100644
--- a/src/3rdparty/squirrel/squirrel/sqapi.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqapi.cpp
@@ -357,7 +357,6 @@ SQRESULT sq_arrayinsert(HSQUIRRELVM v,SQInteger idx,SQInteger destpos)
void sq_newclosure(HSQUIRRELVM v,SQFUNCTION func,SQUnsignedInteger nfreevars)
{
SQNativeClosure *nc = SQNativeClosure::Create(_ss(v), func);
- nc->_nparamscheck = 0;
for(SQUnsignedInteger i = 0; i < nfreevars; i++) {
nc->_outervalues.push_back(v->Top());
v->Pop();
diff --git a/src/3rdparty/squirrel/squirrel/sqclosure.h b/src/3rdparty/squirrel/squirrel/sqclosure.h
index f872f2b8d..a42dcd575 100644
--- a/src/3rdparty/squirrel/squirrel/sqclosure.h
+++ b/src/3rdparty/squirrel/squirrel/sqclosure.h
@@ -80,7 +80,7 @@ public:
struct SQNativeClosure : public CHAINABLE_OBJ
{
private:
- SQNativeClosure(SQSharedState *ss,SQFUNCTION func){_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); }
+ SQNativeClosure(SQSharedState *ss,SQFUNCTION func) : _nparamscheck(0) {_function=func;INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this); }
public:
static SQNativeClosure *Create(SQSharedState *ss,SQFUNCTION func)
{