Skip to content

Commit

Permalink
warn about missing callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Dec 16, 2024
1 parent 44bfc22 commit b4f60b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/exparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion src/processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ 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))
{
log_fatal("could not read JSON data");
}
free_gamedata();
init_resources();
init_locales(init_locale);

lastturn = turn;
Expand Down

0 comments on commit b4f60b8

Please sign in to comment.