Assert was invalid

illegal parameters to scanf
This commit is contained in:
Enno Rehling 2002-11-02 14:48:12 +00:00
parent 1ecdd3dd7f
commit 043380ae84
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
/* ------------------------------------------------------------- */

View File

@ -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);