nhmall [Thu, 21 Oct 2021 15:53:01 +0000 (11:53 -0400)]
clang 12 warning
makedefs.c:1560:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
" ",
^
makedefs.c:1559:5: note: place parentheses around the string literal to silence warning
"currently available will not suffice for proving that P != NP or "
^
1 warning generated.
On 59818fb, MAX_RADIUS was changed from 15 to 16 to intend to support
"radius 0". But MAX_RADIUS doesn't means the range but outer bound of
the radius table, so it should not be changed, and this change led
possible out-of-bound access on view_from() and do_clear_area() in
vision.c.
This commit reverts the change and avoids the problem.
PatR [Wed, 20 Oct 2021 21:56:01 +0000 (14:56 -0700)]
fix #K3472 - stale perm_invent when engraving
Engraving with a weapon which has known enchantment or with a magic
marker which has known charge count that decremented the amount did
so without updating the persistent inventory display. Report was
for curses but applied to every interface that can show perm_invent.
This includes some reformatting (mostly
if {
}
else {
}
to
if {
} else {
}
multiple times; also add some new braces after 'if' or 'else' where
one half already had those and the other didn't). And removal of
some unnecessary 'register' designators.
Plus fix up one sanity check which complained if number of charges
being used was more than a marker had, but then let the engraving
continue and decrement the count by that large amount. If that
impossible situation ever occurred, it would result in a marker
with negative charges.
PatR [Mon, 18 Oct 2021 19:55:28 +0000 (12:55 -0700)]
boulders vs vault walls
Noticed when testing the "wall_angle: unknown" fix, if there is a
boulder rather than a door in the breach in a vault's walls at the
spot where the guard arrives, the guard would walk onto it, tell the
hero to drop any gold and follow, then move back. The boulder would
remain in the hero's way and couldn't be pushed because the guard was
in the boulder's way. Have the guard smash any such boulder(s) into
rocks when arriving (with no explanation for how that is accomplished,
just a message about seeing or hearing boulder(s) shatter). Later
when repairing the walls, delete any rocks or boulders at all vault
wall locations (even when no gap-to-wall repair is needed).
PatR [Mon, 18 Oct 2021 19:10:38 +0000 (12:10 -0700)]
another "next boulder" bit
simpleonames() calls minimal_xname() which was setting up a dummy
object and making its corpsenm field be NON_PM. For a boulder, that
yielded "next boulder" instead of the intended "boulder".
nhmall [Sun, 17 Oct 2021 02:22:33 +0000 (22:22 -0400)]
melting ice timeout issues
Reported directly to devteam by entrez via email:
>
> I noticed some potential issues with (melting) ice:
>
> * Digging down into ice, or setting a land mine on the ice and
> triggering it, doesn't remove the melt_ice timeout, so it can result
> in a sequence like dig down -> pit fills with water -> freeze water
> -> freezing water tries to set melt_ice timeout -> duplicate timeout
> impossible. Or if you don't freeze the water again, melt_ice will
> run on a non-ice surface, which might at least produce strange
> messages.
>
> * Setting a land mine on ice: melting ice doesn't do anything with
> the trap, so there is still a land mine which you can trigger by
> flying over the water (the land mine's trigger is also still
> described as being 'in a pile of soil', despite being underwater at
> this point). Similar thing happens with bear traps.
>
> * Not really related to _melting_ ice, but an exploding land mine
> doesn't reset the typ from ICE to FLOOR (like normal digging does),
> so it will result in a square with a pit that is also an ice square,
> where the ice can melt under the pit and produce a combination
> pit/moat. If you then freeze the moat, the pit reappears on top of
> the ice.
PatR [Sat, 16 Oct 2021 18:35:11 +0000 (11:35 -0700)]
more github issue #606 - wall repair vs doors
Fix the vault repair issue that could lead to "wall_angle: unknown"
warning. Unlike shop repair, the original wall info isn't available
so this recreates it. The extra 'flags' field added yesterday could
be eliminated but this leaves it in place.
PatR [Sat, 16 Oct 2021 16:54:08 +0000 (09:54 -0700)]
travelling through boulders
If the hero can move to a boulder's location via m<dir>, allow travel
to do so too. You will always stop on the boulder spot rather than
keep going toward the destination because of change in visibility at
a boulder spot.
Giants should be able to see over boulders, and doing that for poly'd
hero would probably be straightforward, but when not poly'd, seeing a
giant beyond a boulder and vice versa seems like it would be a can of
giant-sized worms.
A couple of other miscellaneous changes are mixed in with this.
Michael Meyer [Tue, 10 Aug 2021 14:28:07 +0000 (10:28 -0400)]
fix m-prefix movement into warning symbol (pr573)
https://github.com/NetHack/NetHack/pull/573 by entrez
Pull request comment states:
"Moving into a position containing a warning symbol with m-<direction> to
'safely' move would still attack as though the 'm' prefix was not
specified. Ensure warning symbols are counted as 'detected' monsters
for this purpose, to avoid falling through to do_attack()."
nhmall [Sat, 16 Oct 2021 14:16:13 +0000 (10:16 -0400)]
out-of-bounds access in farlook pr592
https://github.com/NetHack/NetHack/pull/592 comment states:
"In commit db68395, most of the instances of xdir and ydir here were
changed to u.dx and u.dy, but not all of them. The remaining ones are
out-of-bounds on xdir and ydir, because i is always set to 12 from an
earlier loop and is no longer involved in handling user input. They
should be u.dx and u.dy like the rest."
PatR [Fri, 15 Oct 2021 22:43:23 +0000 (15:43 -0700)]
fix github issue #606 - shop wall repair
triggering an impossible warning about "wall_angle: unknown" due
to the known conflict between door state and wall info which both
overlay the flags field for map locations.
Reported and diagnosed by vultur-cadens: if a shop's wall was dug
open, followed by use of locking magic to plug the gap with a door,
and then unlocking that door, the D_CLOSED door flag was left as
invalid wall_info when shop damage was repaired. Map re-display
complained. Leaving the door locked or opening it after unlocking
did not result in any complaint because the values for those door
states do not conflict with wall angle values.
The problem was reproducible and is now fixed by adding an extra
field to the shop damage structure. A similar change has been
made to the vault guard's 'fake corridor' structure but I have no
test case for that so don't know whether it makes any difference.
At least it doesn't seem to have broken anything.
Existing save and bones files are invalidated by the fixes.
PatR [Mon, 11 Oct 2021 21:50:29 +0000 (14:50 -0700)]
last? boulder change - Guidebook update
Describe the new feature of m<dir> making it feasible to move to a
boulder'd spot without pushing. Giving specific information among
vague descriptions is awkward....
While in there, move a handful of sentences to separate lines as per
the 'roff guidelines. I did the same for Guidebook.tex even though
it's not needed there, to try to keep things parallel.
nhmall [Mon, 11 Oct 2021 13:48:48 +0000 (09:48 -0400)]
Windows virtual terminal sequences
Microsoft has been making a recommendation that programs should switch
from using the classic low-level console API calls to virtual terminal
sequences for a couple of years.
References:
"Our recommendation is to replace the classic Windows Console API with virtual
terminal sequences. This article will outline the difference between the two
and discuss the reasons for our recommendation."
From:
Classic Console APIs versus Virtual Terminal Sequences
https://docs.microsoft.com/en-us/windows/console/classic-vs-vt
The online documentation for WriteConsoleOutputCharacter() and
WriteConsoleOutputAttribute() have this disclaimer on them:
"This document describes console platform functionality that is no longer a
part of our ecosystem roadmap. We do not recommend using this content in new
products, but we will continue to support existing usages for the indefinite
future. Our preferred modern solution focuses on virtual terminal sequences
for maximum compatibility in cross-platform scenarios. You can find more
information about this design decision in our classic console vs. virtual
terminal document."
Since NetHack started out as a terminal program, before there was a
Windows "classic" console API introduced with Windows NT, it seemed only
fitting that the Windows console port should evolve in the virtual terminal
direction.
This is a first stab at it. The performance won't be as instantaneous as
the low-level console API's. That's likely partly because of this consoletty.c
initial implementation, but it may also partly be because under the hood in
the OS, there's recognitions/translations/conversions going on. Microsoft
states it will continue to evolve the Windows Terminal and console, and
hopefully it will improve. Hopefully it isn't too slow to play. It still
attempts to take advantage of the back buffer stuff that Barton House
introduced to minimize screen updates. At this point, it can still be
recompiled without the virtual terminal support by defining NO_VT when
compiling consoletty.c, or by commenting out the definition of
VIRTUAL_TERMINAL_SEQUENCES at the top of sys/windows/consoletty.c
That's the informational news, and the negative news out of the way.
There's some good news too. Because the virtual terminal sequences
support include 24-bit color support, the Windows console under virtual
terminal sequence can provide a more pleasant set of colors to the NetHack
console interface. To that end, some color changes have been implemented
in consoletty.c now.
It makes the console port ready to accept and display 24-bit color from
the NetHack core, if that should ever happen, as well.
As usual with a first implementation, there may be some bugs. Reports
are welcome.
PatR [Mon, 11 Oct 2021 01:05:11 +0000 (18:05 -0700)]
and even more boulders...
Revise the m<dir>-toward-boulder handling to let a hero who would be
able to squeese into the boulder's spot if it was blocked from being
pushed to do the squeeze without any pushing.
Unlike the previous changes, this might have an impact on play. It
allows squeezing under then stepping past an unblocked boulder that's
in a corridor in order to be able to push it back the other direction
where maybe there's more room to maneuver it out of the way.
PatR [Sun, 10 Oct 2021 22:02:21 +0000 (15:02 -0700)]
yet more boulders: allow m<dir> to not push them
Allow a hero polymorphed into a giant to move to a boulder's spot
via m<dir> no-pickup move, instead of having to push it until the
way is blocked by something and then having push failure move hero
to the spot.
Also change m<dir> when not a giant to no longer push the boulder.
No time will elapse when not moving unless hero who didn't know
that there was a boulder there learns that one is. Since no actual
push attempt gets performed, player doesn't learn whether there is
anything beyond the boulder that inhibits it from being pushed.
PatR [Sun, 10 Oct 2021 19:59:17 +0000 (12:59 -0700)]
boulder sanity checking
Three new checks:
1) boulders are expected to be at the top of their piles, or when
not on top, only other boulders are above them;
2) boulders shouldn't be located at water or lava spots;
3) verify that boulders don't have their 'next_boulder' flag still
set at times when sanity checks take place; that's only valid
during moverock() [plus its calls to boulder_hits_pool()].
PatR [Sun, 10 Oct 2021 19:39:27 +0000 (12:39 -0700)]
"new boulder" fix
The default value for obj->corpsenm is NON_PM which is -1, so the
default value of boulder->next_boulder was non-zero instead of 0
as expected. Because of that, boulder object formatting by xname()
was yielding "next boulder" when plain "boulder" was intended.
Until the boulder or one in a pile above it got pushed, then it
was explicitly reset.
PatR [Sat, 9 Oct 2021 17:54:47 +0000 (10:54 -0700)]
better boulder pushing feedback
When you push a pile of boulders, describe the second and remainder
as "the next boulder" rather than just "the boulder". Matters most
when pushing into water or lava and you keep on pushing when the
first one or more sink into the pool or plug it, but also matters
for an ordinary push where the top-most one moves successfully and
then blocks the continuation attempt to push the second one. It was
somewhat confusing when all the messages said "the boulder" whether
they were referring to the same boulder or different ones.
Multiple pushes on the same move has always been a bit odd, but this
doesn't change that, just the feedback it generates.
PatR [Fri, 8 Oct 2021 20:53:21 +0000 (13:53 -0700)]
simpleonames() fix
Some code from about a month back changed xname() and doname() to
only use a single 'obuf[]'. That was to make sure that perm_invent
update also used at most one obuf. They use some slightly convoluted
code when they called other routines which returned an obuf because
only the most recently allocated one can be explicitly released for
re-use. That works, so I did the same for simpleonames() and
thesimpleoname() and for some reason neglected the convolution for
simpleonames().
For the case where plural was needed, it needs two obufs and tried
to release the first, which is a no-op. So if it was used in a loop
like display_pickinv() uses doname(), it could have cycled through
all the obufs and clobbered one a caller was expecting to remember.
I'm not aware of any instances of this being an actual problem, just
happened to notice that simpleonames() was different from other
similar routines.
PatR [Thu, 7 Oct 2021 17:09:44 +0000 (10:09 -0700)]
more DEF_PAGER
For Unix, add internal vs external pager choice to #version.
Others always use internal pagination so don't need to see that.
Also remove obsolete "command completion" option. I don't know
when it became unconditional but that was long enough ago to be
absent from the git log and from second cvs log included in that.
PatR [Wed, 6 Oct 2021 20:46:27 +0000 (13:46 -0700)]
fix confused remove curse bug
Reported directly to devteam, player observed that objects on the
floor had their bless/curse state change when reading a blessed
scroll of remove curse while confused. Message feedback mentioned
a silver saber being dropped. I didn't attempt to view the ttyrec
playbacks; what I'm sure happened was that the saber was secondary
weapon for dual wielding and had been uncursed; the confused remove
curse effect cursed it, which in turn caused it to be dropped. The
saber's 'next object' pointer became the [previous] top of the pile
at that spot and further object traversal intended to process the
rest of hero's inventory ended up processing floor objects there
instead.
This bug has been present for over 20 years (since 3.3.0 came out
in late 1999, when dual wielding was introduced and cursing of the
secondary weapon forced it to be dropped since making it become
welded was deemed to be too complicated) and never been reported.
Most likely players keep secondary weapons blessed so the scroll
effect doesn't touch them and simple object traversal sticks with
inventory. Or items at the spot have unknown BUC state so having
them be affected wouldn't be particularly noticeable.
PatR [Tue, 5 Oct 2021 08:11:24 +0000 (01:11 -0700)]
fix Unix build with DEF_PAGER defined
Eliminate a couple of compile warnings produced when DEF_PAGER is
defined: unixmain.c: g.catmore=DEF_PAGER; wintty.c: fd=open(...).
Override its use when DLB is also defined since an external pager
could access 'license' but not 'history', 'opthelp', &c when those
are in the dlb container file.
In the commented out value for DEF_PAGER, show a viable value for
the default configuration these days.
PatR [Sun, 3 Oct 2021 21:15:02 +0000 (14:15 -0700)]
displacer monster vs long worm
Reported directly to devteam: monster vs monster location swapping
didn't handle single-segment long worms properly. Multi-segment
worms are disallowed but a worm with no visible segments (which
actually has 1 segment at the head's location) are allowed and the
segment wasn't being moved with the core monster and could trigger
warnings if sanity checking is enabled. The next time that the
worm moved, it got itself back in synch.
I couldn't reproduce the warning but mdisplacem() clearly assumed
that a long worm reporting 0 segments didn't have any so wasn't
attempting to handle the hidden one.
The #adjust command can be used to split an object stack and if the
shop price of the two halves are different, the new stack will have
its obj->o_id modified to make the prices the same. That could be
used to tip off the player as to what the low bits of the next o_id
will be. Since no time passes, no intervening activity such as
random creation of a new monster can take place, so the player could
wish for something that depends on o_id with some degree of control.
Matters mainly for helms of opposite alignment intended to be used
by neutral characters since the player isn't supposed to be able to
control that. (Other items like T-shirt slogan text and candy bar
wrapper text had a similar issue but controlling those wouldn't have
had any tangible difference on play.)
The issue writeup suggested allowing the player to specify a helm's
alignment during a wish. That would defeat the purpose of having
o_id affect the helm's behavior in an arbitrary but repeatable way
so is rejected.
I implemented this fix before seeing a followup comment that suggests
using a more sophisticated decision than 'obj->o_id % N' for the
arbitrary effect. This just increments context.ident for the next
obj->o_id or mon->m_id by 1 or 2 instead of always by 1 and should
be adequate. It also has the side-effect that two consecutive wishes
for helm of opposite alignment won't necessary give one for each of
the two possible 'polarities', even with no intervening activity by
monsters, reinforcing the lack of player control.
Minor bonus fix: it moves the incrementing check for wrap-to-0 into
a single place instead of replicating that half a dozen times. Ones
that should have been there for shop billing and for objects loaded
from bones files were missing.
by the Riders that only damage the hero, not other monsters.
Noticed and diagnosed by vultur-cadens. Attacks dishing out the
damage type AD_DETH (Death), AD_FAMN (Famine), AD_PEST (Pestilence),
and also AD_DISE (Demogorgon, Juiblex, Scorpius) did 0 damage if
inflicted against monsters. That made Death harmless to other
monsters. The others have additional attacks (in the two Rider's
cases, only if both instances of their special attack hit on the
same move so that the second one is converted into a stun attack)
and could manage to kill other monsters.
The uhitm case can't happen. I suspect that the mhitm case was
originally intentionally omitted as something which won't happen,
but that's just a guess.
Be able to run 'make Guidebook{|.txt|.ps}' in the doc subdirectory
without requring a full install first.
makedefs is no longer one of the first things built when building
nethack, and even if it was, nobody should have to rebuild all of
nethack after 'make spotless' when they just want to create one
or more of the formatted Guidebooks. The 'roff versions (.ps and
also .txt) use makedefs as a filter by default, so wouldn't build
if it wasn't there.
Fix out-of-bounds access of xdir and ydir in farlook
In commit db68395, most of the instances of xdir and ydir here were
changed to u.dx and u.dy, but not all of them. The remaining ones are
out-of-bounds on xdir and ydir, because i is always set to 12 from an
earlier loop and is no longer involved in handling user input. They
should be u.dx and u.dy like the rest.
Reported and diagnosed by entrez:
recalc_mapseen() has been looking at all slots in u.urooms[] rather
than stopping at the first \0. Since the whole array doesn't get
zeroed out when the value changes, stale room indices might follow
that first \0 and any rooms those referred to would erroneously get
flagged as having been visited by overview updates. Wouldn't matter
for the level where the stale indices got set, since you'd have to
have been in those rooms for it to happen, but would matter once you
moved on to other levels.
The 5 glyphs are now unaligned_altar, chaotic_altar, neutral_altar,
lawful_altar, and high_altar. The latter is only mapped if you are
on astral or sanctum levels.
Reported by entrez as a github issue for evilhack, 'gcc -2' issued
warnings about droppables() possibly returning the address of a local
variable (&dummy). It is mistaken; that never gets returned because
of various checks being performed. But making 'dummy' be static adds
negligible cost and should shut it up (not verified but no doubt
about viability...).
sp_lev.c: In function ‘lspo_altar’:
sp_lev.c:3962:9: warning: declaration of ‘shrine’ shadows a global
declaration [-Wshadow]
3962 | int shrine;
| ^~~~~~
In file included from ../include/hack.h:217,
from sp_lev.c:14:
../include/display.h:959:5: note: shadowed
declaration is here
959 | shrine
| ^~~~~~
Pasi Kallinen [Sun, 19 Sep 2021 10:51:51 +0000 (13:51 +0300)]
Gas clouds expand around terrain rather than being rhomboid
The gas will expand from its chosen center point via breadth-first
search instead of hardcoding a diagonal shape. The search is performed
with a randomized list of directions, and has 50% chance of not spreading
to a space it otherwise would have spread to. This has the effect of fuzzing
the cloud edges in open areas, helping the clouds on, for instance,
the Plane of Fire not be big rhombuses.
Also some other code refactoring related to stinking clouds in read.c
This comes from xNetHack by copperwater <aosdict@gmail.com>
The walls for the mines, gehennom, knox, and sokoban had been
changed at the "tile"-level, with no awareness of the core game,
or non-tile interfaces.
- Expand the glyphs to include a set of walls for the main level
as well as each of those mentioned above.
Altars had been adjusted at the map_glyphinfo() level to substitute
some color variations on-the-fly for unaligned, chaotic, neutral,
lawful altars, and shrines. The tile interface had no awareness of
the feature.
- Expand the glyphs to include each of the altar variations that
had been implemented in the display code for tty-only. This required
the addition of four placeholder tiles in other.txt. Someone with
artistic skill will hopefully alter the additional tiles to better
reflect their intended purpose.
Explosions had unique tiles in the tile window port, and the display
code for tty tinkered with the colors, but the game had very little
awareness of the different types of explosions.
- Expand the glyphs to include each of the explosion types: dark,
noxious, muddy, wet, magical, fiery and frosty.
Pile-markers to represent a pile had been introduced at the
display-level, without little to no awareness by the core game.
- Expand the glyphs to include piletops, including objects,
bodys, and statues.
Recently male and female variations of tiles and monsters had been
had been introduced, but the mechanics had been mostly done at the
display-level through a marker flag. The window port interface then
had to increment the tile mapped to the glyph to get the female version
of the tile.
- Expand the glyphs to include the male and female versions of the
monsters, and their corresponding pet versions, ridden, detected
versions and statues of them.
Direct references to GLYPH_BODY_OFF and GLYPH_STATUE_OFF
in object_from_map() in pager.c were getting incomplete results.
- Add macros glyph_to_body_corpsenm(glyph) and
glyph_to_statue_corpsenm(glyph) macros for obtaining the corpsenm
value after passing the glyph_is_body() or glyph_is_statue() test.
Other relevant notes:
- The tile ordering in the win/share/*.txt tile files has been altered,
other.txt in particular.
- tilemap.c has had a lot of alterations to accommodate the expanded
glyphs. Output that is useful for troubleshooting will end up in
tilemappings.lst if OBTAIN_TILEMAP is defined during build.
It lists all of the glyphs and which tile it gets mapped to, and also
lists each tile and some of the references to it by various glyphs.
- An array glyphmap[MAXGLYPH] is now used. It has an entry for each
glyph, ordered by glyph, and once reset_glyphs(glyph) has been run, it
contains the mapped symindex, default color, glyphflags, and tile
index.
If USE_TILES is defined during build, the tile.c produced from the
tilemap utility populates the tileidx field of each array element with
a glyph-to-tile mapping for the glyph. Later on, when reset_glyphmap()
is run, the other fields of each element will get populated.
- The glyph-to-tile mapping is an added field available to a window
port via the glyphinfo struct passed in the documented interface. The
old glyph2tile[] array is gone. The various active window ports that
had been using glyph2tile[] have been updated to use the new interface
mechanism. Disclaimer: There may be some bug fixing or tidying
required in the window port code.
- reset_glyphmap() is called after config file options parsing
has finished, because some config file settings can impact the results
produced by reset_glyphmap().
- Everything that passes the glyph_is_cmap(glyph) test must
return a valid cmap value from glyph_to_cmap(glyph).
- An 'extern glyph_info glyphmap[MAX_GLYPH];' is inserted into the
top of only the files which need awareness of it, not inserted into
display.h. Presently, the only files that actually need to directly
reference the glyphmap[] array are display.c, o_init.c (for shuffling
the tiles), and the generated tile.c (if USE_TILES is defined).
- Added an MG_MALE glyphflag to complement the MG_FEMALE glyphflag.
- Provide an array for wall colorizations. reset_glyphmap() will draw
the colors from this array: int array wallcolors[sokoban_walls + 1];
The indices of the wallcolors array are main_walls (0), mines_walls
(1), gehennom_walls (2), knox_walls (3), and sokoban_walls (4).
In future, a config file option for adjusting the wall colors and/or
an 'O' option menu to do the same could be added. Right now, the
initializaton of the wallcolors[] array entries in display.c leaves the
walls at CLR_GRAY, matching the defsym color.
- Most of the display-level kludges for some of the on-the-fly
interface features have been removed from map_glyphinfo() as they
aren't needed any longer. These glyph expansions adhere more closely to
the original glyph mechanics of the game.
- Because the glyphs are re-ordered and expanded, an update to
editlevel will be required upon merge of these changes.
Use a slightly more meaningful name for each one rather than
a sequential numerical name.
S_explode1 to S_expl_tl
S_explode2 to S_expl_tc
S_explode3 to S_expl_tr
S_explode4 to S_expl_ml
S_explode5 to S_expl_mc
S_explode6 to S_expl_mr
S_explode7 to S_expl_bl
S_explode8 to S_expl_bc
S_explode9 to S_expl_br
Pasi Kallinen [Fri, 17 Sep 2021 17:52:54 +0000 (20:52 +0300)]
Allow dropping just picked up items
When using a menu to drop or put in items into a container,
allow putting in the item (or items) you picked up previously,
by selecting the 'P' entry from the item class menu
Inspired by the itemcat patch by Stanislav Traykov.
Reported and diagnosed by entrez:
"The <mon> yanks <two-handed weapon> from your corpses!"
It became unwielded and that triggered a perm_invent update and
such updates reformat entire inventory, so if that contains a dozen
or more items it will use all the obuf[] static buffers as least
once. In this case, the bullwhip code had plural of "hand" in one
of those buffers and by the time it delivered the message which
used that, the value had been clobbered.
As the diagnosis mentioned, it can be tricky to reproduce since
either &obuf[0] or &obuf[PREFIX] might be used and if the value
being clobbered didn't overlap, the effect wasn't noticeable.
Instead of fixing the bullwhip message, this changes inventory
display so that it should no longer churn through all the buffers.
It also adds a fixes entry for #K3401, which was already fixed for
3.7 but I hadn't been able to reproduce it for 3.6.x (which I now
blame on the PREFIX trickiness).