diff --git a/src/exparse.c b/src/exparse.c index 2e5fb2e5b..c684b3719 100644 --- a/src/exparse.c +++ b/src/exparse.c @@ -805,7 +805,11 @@ static void start_resources(parseinfo *pi, const XML_Char *el, const XML_Char ** name = attr[i + 1]; } else if (xml_strequal(attr[i], "value")) { - fun = get_function(attr[i + 1]); + const char *value = attr[i + 1]; + fun = get_function(value); + if (!fun) { + log_warning("no such resource function: %s", value); + } } else { handle_bad_input(pi, el, attr[i]); diff --git a/src/processing.c b/src/processing.c index c1ef4f102..a8db09bf7 100644 --- a/src/processing.c +++ b/src/processing.c @@ -35,6 +35,7 @@ void run_turn(void) log_fatal("game.rules is null"); } + init_resources(); if (0 != config_read( path_join(path_join("conf", config_path, path, sizeof(path)), "config.json", path, sizeof(path)), install_path)) @@ -42,7 +43,6 @@ void run_turn(void) log_fatal("could not read JSON data"); } free_gamedata(); - init_resources(); init_locales(init_locale); lastturn = turn;