fix a crash caused by an old curse

This commit is contained in:
Enno Rehling 2012-07-29 00:35:17 +02:00
parent a093f782d9
commit dbc09d35ac
1 changed files with 4 additions and 1 deletions

View File

@ -438,7 +438,10 @@ double curse_geteffect(const curse * c)
int curse_geteffect_int(const curse * c) int curse_geteffect_int(const curse * c)
{ {
double effect = curse_geteffect(c); double effect = curse_geteffect(c);
assert(effect - (int)effect == 0); if (effect - (int)effect != 0) {
log_error("curse has an integer attribute with float value: '%s' = %lf",
c->type->cname, effect);
}
return (int)effect; return (int)effect;
} }