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.
This commit is contained in:
Pasi Kallinen
2017-10-20 16:15:02 +03:00
parent 4fad1ba3cc
commit 0bf824a81e

View File

@@ -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;