diff options
author | rubidium <rubidium@openttd.org> | 2014-09-17 18:35:45 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-17 18:35:45 +0000 |
commit | dba98e85cb56d7a4925b0f1c72f004e1e8c9d65a (patch) | |
tree | 0deec5337597d5d3fc480f693d28fb9e7e406651 | |
parent | 6defde275c0193ddddea38eece1a0c30bc45b058 (diff) | |
download | openttd-dba98e85cb56d7a4925b0f1c72f004e1e8c9d65a.tar.xz |
(svn r26845) -Fix [Squirrel]: more uninitialized variables in constructors
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqfuncproto.h | 1 | ||||
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqlexer.cpp | 6 | ||||
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqstate.cpp | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqfuncproto.h b/src/3rdparty/squirrel/squirrel/sqfuncproto.h index 3829de037..e58ccd299 100644 --- a/src/3rdparty/squirrel/squirrel/sqfuncproto.h +++ b/src/3rdparty/squirrel/squirrel/sqfuncproto.h @@ -80,6 +80,7 @@ private: { _stacksize=0; _bgenerator=false; + _varparams = false; _ninstructions = ninstructions; _literals = (SQObjectPtr*)&_instructions[ninstructions]; _nliterals = nliterals; diff --git a/src/3rdparty/squirrel/squirrel/sqlexer.cpp b/src/3rdparty/squirrel/squirrel/sqlexer.cpp index aa19845ad..d1d934920 100644 --- a/src/3rdparty/squirrel/squirrel/sqlexer.cpp +++ b/src/3rdparty/squirrel/squirrel/sqlexer.cpp @@ -85,6 +85,12 @@ SQLexer::SQLexer(SQSharedState *ss, SQLEXREADFUNC rg, SQUserPointer up,CompilerE _lasttokenline = _currentline = 1; _currentcolumn = 0; _prevtoken = -1; + _curtoken = -1; + + _svalue = NULL; + _nvalue = 0; + _fvalue = 0; + Next(); } diff --git a/src/3rdparty/squirrel/squirrel/sqstate.cpp b/src/3rdparty/squirrel/squirrel/sqstate.cpp index b7c63746f..66693097d 100644 --- a/src/3rdparty/squirrel/squirrel/sqstate.cpp +++ b/src/3rdparty/squirrel/squirrel/sqstate.cpp @@ -539,6 +539,7 @@ SQString::SQString(const SQChar *news, SQInteger len) _len = len; _hash = ::_hashstr(news,(size_t)len); _next = NULL; + _sharedstate = NULL; } void SQStringTable::Resize(SQInteger size) |