Skip to content

Commit

Permalink
Fix main menu being unable to set secure settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja committed Mar 3, 2016
1 parent abd4a79 commit 7bcbc01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/script/lua_api/l_util.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 7bcbc01

Please sign in to comment.