diff options
author | ShadowNinja <shadowninja@minetest.net> | 2016-03-03 00:57:19 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2016-03-03 00:57:19 -0500 |
commit | 7bcbc0105b3e67b7e066be6fd77775769cffdd16 (patch) | |
tree | d9c76ca91330c189f875c12d44b4c332179b7085 /src/script/lua_api | |
parent | abd4a79acbdfcea0bb661b8065ef3ac8f3e25e80 (diff) | |
download | minetest-7bcbc0105b3e67b7e066be6fd77775769cffdd16.tar.gz minetest-7bcbc0105b3e67b7e066be6fd77775769cffdd16.tar.bz2 minetest-7bcbc0105b3e67b7e066be6fd77775769cffdd16.zip |
Fix main menu being unable to set secure settings
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_util.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index cc4467bb6..df46925d1 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -75,9 +75,10 @@ int ModApiUtil::l_get_us_time(lua_State *L) } #define CHECK_SECURE_SETTING(L, name) \ - if (name.compare(0, 7, "secure.") == 0) {\ - lua_pushliteral(L, "Attempt to set secure setting.");\ - lua_error(L);\ + if (ScriptApiSecurity::isSecure(L) && \ + name.compare(0, 7, "secure.") == 0) { \ + lua_pushliteral(L, "Attempt to set secure setting."); \ + lua_error(L); \ } // setting_set(name, value) |