diff --git a/doc/fixes34.1 b/doc/fixes34.1 index be66c0440..d48623fa2 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -224,6 +224,8 @@ make sure that missing file trickery in wizard mode which is discovered during level change doesn't try to keep going after discarding current level contribution by Adam Wozniak adds several const & changes some char* to char[] fix impossible when hitting/jousting a monster causes it to be killed twice +fix a GOLDOBJ crash/hang in take_gold() that could be triggered by reading a + cursed spellbook, or by sitting on a throne Platform- and/or Interface-Specific Fixes diff --git a/src/sit.c b/src/sit.c index 75b8ad5d9..7b6550f67 100644 --- a/src/sit.c +++ b/src/sit.c @@ -17,9 +17,10 @@ take_gold() flags.botl = 1; } #else - struct obj *otmp; + struct obj *otmp, *nobj; int lost_money = 0; - for (otmp = invent; otmp; otmp = otmp->nobj) { + for (otmp = invent; otmp; otmp = nobj) { + nobj = otmp->nobj; if (otmp->oclass == COIN_CLASS) { lost_money = 1; delobj(otmp);