Skip to content

Commit

Permalink
Fix uninitialized variable error
Browse files Browse the repository at this point in the history
If you run minetest with valgrind, you'll quickly notice uninitialized jump
depend error messages that point to s_base.cpp:131. This commit fixes those.
  • Loading branch information
est31 committed Jun 2, 2015
1 parent b8a8be9 commit ba3ff5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/script/cpp_api/s_base.cpp
Expand Up @@ -103,6 +103,11 @@ ScriptApiBase::ScriptApiBase()
lua_pushstring(m_luastack, porting::getPlatformName());
lua_setglobal(m_luastack, "PLATFORM");

// m_secure gets set to true inside
// ScriptApiSecurity::initializeSecurity(), if neccessary.
// Default to false otherwise
m_secure = false;

m_server = NULL;
m_environment = NULL;
m_guiengine = NULL;
Expand Down

0 comments on commit ba3ff5e

Please sign in to comment.