patch4.patch 957 B

123456789101112131415161718192021222324252627282930
  1. diff --git a/external/squirrel/squirrel/sqfuncproto.h b/external/squirrel/squirrel/sqfuncproto.h
  2. index cd48aa6..d2c99ad 100644
  3. --- a/external/squirrel/squirrel/sqfuncproto.h
  4. +++ b/external/squirrel/squirrel/sqfuncproto.h
  5. @@ -12,7 +12,7 @@ enum SQOuterType {
  6. struct SQOuterVar
  7. {
  8. - SQOuterVar(){}
  9. + SQOuterVar() : _type(otLOCAL) {}
  10. SQOuterVar(const SQObjectPtr &name,const SQObjectPtr &src,SQOuterType t)
  11. {
  12. _name = name;
  13. diff --git a/external/squirrel/squirrel/sqvm.cpp b/external/squirrel/squirrel/sqvm.cpp
  14. index de0927f..d814d85 100644
  15. --- a/external/squirrel/squirrel/sqvm.cpp
  16. +++ b/external/squirrel/squirrel/sqvm.cpp
  17. @@ -119,6 +119,11 @@ SQVM::SQVM(SQSharedState *ss)
  18. _debughook_native = NULL;
  19. _debughook_closure.Null();
  20. _openouters = NULL;
  21. + _top = 0;
  22. + _stackbase = 0;
  23. + _callsstack = NULL;
  24. + _callsstacksize = 0;
  25. + _alloccallsstacksize = 0;
  26. ci = NULL;
  27. INIT_CHAIN();ADD_TO_CHAIN(&_ss(this)->_gc_chain,this);
  28. }