diff options
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_settings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/lua_api/l_settings.cpp b/src/script/lua_api/l_settings.cpp index 13a88ee95..9c88a3e05 100644 --- a/src/script/lua_api/l_settings.cpp +++ b/src/script/lua_api/l_settings.cpp @@ -73,9 +73,10 @@ int LuaSettings::l_set(lua_State* L) std::string key = std::string(luaL_checkstring(L, 2)); const char* value = luaL_checkstring(L, 3); - o->m_settings->set(key, value); + if (!o->m_settings->set(key, value)) + throw LuaError("Invalid sequence found in setting parameters"); - return 1; + return 0; } // remove(self, key) -> success |