Fix for newly detected squirrel errors
authorTobias Markus <tobbi@mozilla-uk.org>
Sun, 15 Mar 2015 14:40:21 +0000 (15:40 +0100)
committerTobias Markus <tobbi@mozilla-uk.org>
Sun, 15 Mar 2015 14:40:21 +0000 (15:40 +0100)
external/squirrel/patches/patch4.patch [new file with mode: 0644]

diff --git a/external/squirrel/patches/patch4.patch b/external/squirrel/patches/patch4.patch
new file mode 100644 (file)
index 0000000..a1081b0
--- /dev/null
@@ -0,0 +1,29 @@
+diff --git a/external/squirrel/squirrel/sqfuncproto.h b/external/squirrel/squirrel/sqfuncproto.h
+index cd48aa6..d2c99ad 100644
+--- a/external/squirrel/squirrel/sqfuncproto.h
++++ b/external/squirrel/squirrel/sqfuncproto.h
+@@ -12,7 +12,7 @@ enum SQOuterType {
+ struct SQOuterVar\r
+ {\r
+       \r
+-      SQOuterVar(){}\r
++      SQOuterVar() : _type(otLOCAL) {}\r
+       SQOuterVar(const SQObjectPtr &name,const SQObjectPtr &src,SQOuterType t)\r
+       {\r
+               _name = name;\r
+diff --git a/external/squirrel/squirrel/sqvm.cpp b/external/squirrel/squirrel/sqvm.cpp
+index de0927f..d814d85 100644
+--- a/external/squirrel/squirrel/sqvm.cpp
++++ b/external/squirrel/squirrel/sqvm.cpp
+@@ -119,6 +119,11 @@ SQVM::SQVM(SQSharedState *ss)
+       _debughook_native = NULL;\r
+       _debughook_closure.Null();\r
+       _openouters = NULL;\r
++      _top = 0;\r
++      _stackbase = 0;\r
++      _callsstack = NULL;\r
++      _callsstacksize = 0;\r
++      _alloccallsstacksize = 0;\r
+       ci = NULL;\r
+       INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this);\r
+ }\r