From 844fcbc16c9e49bc86df3f35b5ac50643e502ded Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 20 Apr 2022 23:27:45 -0700 Subject: [PATCH] item-actions for 'I' Support context-sensitive inventory item-actions from the class inventory display ('I' command) as well as from regular inventory. --- src/invent.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/invent.c b/src/invent.c index 8289f19ee..d13925409 100644 --- a/src/invent.c +++ b/src/invent.c @@ -3911,8 +3911,12 @@ dotypeinv(void) if (query_objlist((char *) 0, &g.invent, ((flags.invlet_constant ? USE_INVLET : 0) | INVORDER_SORT | INCLUDE_VENOM), - &pick_list, PICK_NONE, this_type_only) > 0) + &pick_list, PICK_ONE, this_type_only) > 0) { + struct obj *otmp = pick_list[0].item.a_obj; + free((genericptr_t) pick_list); + (void) itemactions(otmp); /* always returns ECMD_OK */ + } doI_done: g.this_type = 0;