From dbc09d35ace029569c33413397cb6c180dad9bd7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 29 Jul 2012 00:35:17 +0200 Subject: [PATCH] fix a crash caused by an old curse --- src/kernel/curse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 4a7403e69..3b0d7c3e2 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -438,7 +438,10 @@ double curse_geteffect(const curse * c) int curse_geteffect_int(const curse * 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; }