more inventory overflow control

Prevent getobj() from overflowing its inventory letter collection
buffer if someone figures out some new way to fill up their inventory with
a huge number of # entries.  Inventory manipulation might become crippled
at that stage but at least it shouldn't be able to trigger a crash.

     Also, the !fixinv configuration was never taught about # and did
strange things if you had more than 52 items, both for inventory display
and object selection with getobj.

     The reassign()/getobj() situation is definitely confused regarding
gold, using GOLD_SYM in some places and def_oc_syms[COIN_CLASS] in
others, and it's schizophrenic about whether the GOLDOBJ configuration
keeps gold in a letter slot or specially named $ slot.  I'm sure there
are some problems there but I'm not planning to try to figure them out.
This commit is contained in:
nethack.rankin
2006-11-03 07:13:27 +00:00
parent 8ead488b63
commit 672c14c0c5
2 changed files with 27 additions and 9 deletions

View File

@@ -265,6 +265,9 @@ fix invalid pointer dereference after applying a wielded cream pie
avoid drowned in a drowning and burned by burning if life-saving is inadequate
reveal hidden monsters who change levels or are magically summoned
hero can't carry an unlimited number of boulders when poly'd into a giant
prevent very large number of objects in # inventory slot from causing
buffer overflow
!fixinv config was using arbitrary characters instead of # for invent overflow
Platform- and/or Interface-Specific Fixes