From: ShadowNinja Date: Thu, 3 Mar 2016 05:57:19 +0000 (-0500) Subject: Fix main menu being unable to set secure settings X-Git-Tag: 0.4.14~205 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7bcbc0105b3e67b7e066be6fd77775769cffdd16;p=oweals%2Fminetest.git Fix main menu being unable to set secure settings --- 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)