]> granicus.if.org Git - nethack/commit
fix "bad fruit #0"
authorPatR <rankin@nethack.org>
Sun, 19 Apr 2015 03:18:43 +0000 (20:18 -0700)
committerPatR <rankin@nethack.org>
Sun, 19 Apr 2015 03:18:43 +0000 (20:18 -0700)
commit7ba63a868ab18b7aac864dc3a33fc60417c0e8b0
treefcda6b11df1a8ac1a48ce3694ff0ae863b95e05a
parent8246c1b7c760e5f0d29473d8a8c7122aabbeeb55
fix "bad fruit #0"

When minimal_xname() set up a dummy object containing as few details
as possible, it wasn't setting up the fruit id field, so xname()
couldn't figure out what type of fruit it had and issued a warning.

I haven't managed a test case that uses minimal_xname so testing of
the fix is less than comprehensive.  [Pasi got it through dopay, but
that only resorts to minimal_xname if the formatted name is really
long and would otherwise cause the shopkeeper's prompt to overflow.
Long fruit name combined with long individual object name wasn't
long enough to trigger that.  Maybe uncursed, greased, rustproof
the like, or possibly just a longer shopkeeper name than I had?]
src/objnam.c