From 0bf824a81e67e4a4723f74aa34b3a6370734f1a7 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 20 Oct 2017 16:15:02 +0300 Subject: [PATCH] Prevent adjusting items to the dash inventory letter The #adjust command allowed, due to compactified buf, putting items into the '-' inventory letter, which is usually reserved for "empty hands", zeroobj. This caused problems down the line when user was allowed to pick that letter for dropping. --- src/invent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invent.c b/src/invent.c index ab1ffc004..46d441e84 100644 --- a/src/invent.c +++ b/src/invent.c @@ -3622,7 +3622,7 @@ doorganize() /* inventory organizer by Del Lamb */ pline1(Never_mind); return 0; } - if ((letter(let) && let != '@') || index(buf, let)) + if ((letter(let) && let != '@') || index(buf, let) && let != '-') break; /* got one */ if (trycnt == 5) goto noadjust;