diff --git a/src/kernel/config.c b/src/kernel/config.c index ca23a5bc9..b2734d43a 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -203,7 +203,7 @@ param_t findparam(const char *s, const struct locale * lang) void **tokens = get_translations(lang, UT_PARAMS); critbit_tree *cb = (critbit_tree *)*tokens; if (!cb) { - log_warning("no parameters defined in locale %s", locale_name(lang)); + log_error("no parameters defined in locale %s", locale_name(lang)); } else if (cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) { cb_get_kv(match, &i, sizeof(int)); diff --git a/src/kernel/race.c b/src/kernel/race.c index c7c2e8165..a4a11c15d 100644 --- a/src/kernel/race.c +++ b/src/kernel/race.c @@ -269,7 +269,13 @@ void free_races(void) { free(opt); } for (i = 0; races->attack[i].type!=AT_NONE; ++i) { - spellref_free(races->attack[i].data.sp); + att *at = races->attack + i; + if (at->type == AT_SPELL) { + spellref_free(at->data.sp); + } + else { + free(at->data.dice); + } } spellref_free(races->precombatspell); free(xrefs); diff --git a/src/kernel/race.h b/src/kernel/race.h index 6321d4f22..c58bad701 100644 --- a/src/kernel/race.h +++ b/src/kernel/race.h @@ -105,7 +105,7 @@ extern "C" { typedef struct att { int type; union { - const char *dice; + char *dice; struct spellref *sp; } data; int flags;