diff --git a/src/common/kernel/curse.c b/src/common/kernel/curse.c index 0116f6c29..8d3323013 100644 --- a/src/common/kernel/curse.c +++ b/src/common/kernel/curse.c @@ -352,8 +352,8 @@ curse_changevigour(attrib **ap, curse *c, int vigour) int curse_geteffect(const curse *c) { - assert(c); - return c->effect.i; + if (c) return c->effect.i; + return 0; } /* ------------------------------------------------------------- */ diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index 932e851e9..a2aae6b3b 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -2162,7 +2162,7 @@ tagbegin(struct xml_stack * stack) if (!strcmp(semi, "flags")) it->flags=i; break; case 'g': - if (!strcmp(semi, "give")) it->give = (int (*)(const unit*, const unit*, const struct item_type *, int, const char *))get_function(s); + if (!strcmp(semi, "give")) it->give = (boolean (*)(const unit*, const unit*, const struct item_type *, int, const char *))get_function(s); break; case 'u': if (!strcmp(semi, "use")) it->use = (int (*)(unit *, const struct item_type *, int, const char *))get_function(s); @@ -2554,7 +2554,7 @@ it_read(FILE * F) if (!strcmp(semi, "flags")) it->flags=i; break; case 'g': - if (!strcmp(semi, "give")) it->give = (int (*)(const unit*, const unit*, const struct item_type *, int, const char *))get_function(s); + if (!strcmp(semi, "give")) it->give = (boolean (*)(const unit*, const unit*, const struct item_type *, int, const char *))get_function(s); break; case 'u': if (!strcmp(semi, "use")) it->use = (int (*)(unit *, const struct item_type *, int, const char *))get_function(s);