Open tung opened 12 years ago
This crash actually occurs when throwing or dropping any object while engulfed. The problem is the new update_location()
function in invent.c, which uses otmp->nexthere
to iterate over objects on the floor and in the inventory of an engulfing monster, but the latter needs to use otmp->nobj
instead.
Fix with context in my experimental branch, as usual.
I get a segfault when dropping a scroll of scare monster while engulfed in an air elemental. To reproduce: get in wizmode, #levelchange to something that won't die instantly, summon an air elemental, get engulfed, wish up a scroll of scare monster, drop the scroll, segfault occurs.
I ran NitroHack in gdb and got this backtrace: