diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dabdc354d..5dbf70fa3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -90,10 +90,11 @@ set(SERVER_SRC console.c helpers.c config.pkg.c + eressea.pkg.c + game.pkg.c locale.pkg.c log.pkg.c process.pkg.c - eressea.pkg.c settings.pkg.c bind_building.c bind_config.c diff --git a/src/bindings.c b/src/bindings.c index 45e23207c..53eba387f 100755 --- a/src/bindings.c +++ b/src/bindings.c @@ -88,6 +88,7 @@ TOLUA_PKG(settings); TOLUA_PKG(config); TOLUA_PKG(locale); TOLUA_PKG(log); +TOLUA_PKG(game); int log_lua_error(lua_State * L) { @@ -1060,6 +1061,7 @@ int tolua_bindings_open(lua_State * L) tolua_eressea_open(L); tolua_process_open(L); tolua_settings_open(L); + tolua_game_open(L); tolua_config_open(L); tolua_locale_open(L); tolua_log_open(L); diff --git a/src/kernel/config.c b/src/kernel/config.c index 8df261479..99796d907 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -1256,7 +1256,7 @@ skill_t findskill(const char *s, const struct locale * lang) const void * match; void **tokens = get_translations(lang, UT_SKILLS); struct critbit_tree *cb = (critbit_tree *)*tokens; - if (cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) { + if (cb && cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) { cb_get_kv(match, &i, sizeof(int)); result = (skill_t)i; }