diff --git a/hackem_changelog.txt b/hackem_changelog.txt index 22b70af2b..58a4d6447 100644 --- a/hackem_changelog.txt +++ b/hackem_changelog.txt @@ -5,6 +5,7 @@ Version 1.2.1 (unreleased) +fix #K4006 - 'null obj after quiver merge' panic (NetHack 3.7) Gave fire bolt a little to-hit boost. Chaotic dragons can betray you (from SLASH'EM). Fix: follow-up to last commit (kicking and martial arts) (From EvilHack). diff --git a/src/apply.c b/src/apply.c index e11b0b88b..1a06d5c41 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1674,10 +1674,14 @@ struct obj **optr; /* * Free & add to re-merge potion. This will average the * age of the potions. Not exactly the best solution, - * but its easy. + * but its easy. Don't do that unless obj is not worn (uwep, + * uswapwep, or uquiver) because if wielded and other oil is + * quivered a "null obj after quiver merge" panic will occur. */ - freeinv(obj); - *optr = addinv(obj); + if (!obj->owornmask) { + freeinv(obj); + *optr = addinv(obj); + } return; } else if (Underwater) { There("is not enough oxygen to sustain a fire.");