aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-06-02 13:55:02 +0200
committerest31 <MTest31@outlook.com>2015-06-02 13:55:02 +0200
commitba3ff5ef39d768da4a0511d22a220b9aafa3d3f6 (patch)
tree4ec029e8ee1a03e27bb19d94f197c1eb03d4c593 /src
parentb8a8be9c86cf6249d7c1be1c01d27deb02bcb58c (diff)
downloadminetest-ba3ff5ef39d768da4a0511d22a220b9aafa3d3f6.tar.gz
minetest-ba3ff5ef39d768da4a0511d22a220b9aafa3d3f6.tar.bz2
minetest-ba3ff5ef39d768da4a0511d22a220b9aafa3d3f6.zip
Fix uninitialized variable error
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.
Diffstat (limited to 'src')
-rw-r--r--src/script/cpp_api/s_base.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp
index 4fb8411ef..8b0b16bfb 100644
--- a/src/script/cpp_api/s_base.cpp
+++ b/src/script/cpp_api/s_base.cpp
@@ -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;