]> granicus.if.org Git - nethack/commit
fix wiz identify bugs
authorPatR <rankin@nethack.org>
Thu, 30 Aug 2018 02:19:49 +0000 (19:19 -0700)
committerPatR <rankin@nethack.org>
Thu, 30 Aug 2018 02:19:49 +0000 (19:19 -0700)
commitf1d0636ba081c1f8052eaa87e9ca4ff85ad59ac9
tree1252207692cb033a82d356bbe980a788f1f6abd7
parent9457fde9fc4617ba1ee3c40477f09cdee06094b5
fix wiz identify bugs

Fixes #124

Fix github pull request #124 which was also reported directly (but not
through the contact form so #Hxxx number).  Using ^I or #wizidentify
displays inventory with everything ID'd for that command only and adds
a menu entry "_ - use '^I' to identify" that can be chosen to make
those ID's persistent.  Picking underscore would work but picking the
alternate '^I' wouldn't work if the platform had unsigned characters
for plain 'char'.  Switch the return value from magic number -1 to
magic number ^I which isn't a valid inventory letter and isn't subject
to sign conversion.  Casting -1 to '(char) -1' would have worked too
despite some confusion expressed in discussion of the pull request.

If ^I has been bound to some other command and #wizidentify hasn't
been bound to any keystroke, temporary ID didn't disclose any extra
information (ie, acted like ordinary inventory display) and the extra
menu entry to make temporary ID become persistent wasn't available.
This fixes that too.
doc/fixes36.2
src/cmd.c
src/end.c
src/invent.c