From e2578966e5975e63ce47149fe5de16a0a14fdc58 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 18 Aug 2017 21:02:23 +0200 Subject: [PATCH 1/2] fix bad data caused by bug 2356 --- src/kernel/curse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 5b881eb82..01f27122e 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -213,6 +213,12 @@ int curse_read(attrib * a, void *owner, gamedata *data) assert(result == 0); return AT_READ_FAIL; } + if (data->version <= NORCSPELL_VERSION) { + if ((c->type->flags & CURSE_NOAGE) && !(c_flags(c) & CURSE_NOAGE)) { + /* bugfix bug 2356 */ + c_setflag(c, CURSE_NOAGE); + } + } if (data->version < EXPLICIT_CURSE_ISNEW_VERSION) { c_clearflag(c, CURSE_ISNEW); } From 89d50e9b725de40bc03bdb645770bc396b3d5dc2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 18 Aug 2017 21:05:26 +0200 Subject: [PATCH 2/2] fix compile, wrong data version. --- src/kernel/curse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 01f27122e..3d236474e 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -213,7 +213,7 @@ int curse_read(attrib * a, void *owner, gamedata *data) assert(result == 0); return AT_READ_FAIL; } - if (data->version <= NORCSPELL_VERSION) { + if (data->version <= NOLANDITEM_VERSION) { if ((c->type->flags & CURSE_NOAGE) && !(c_flags(c) & CURSE_NOAGE)) { /* bugfix bug 2356 */ c_setflag(c, CURSE_NOAGE);