]> granicus.if.org Git - nethack/commit
get_cost_from_price
authorPatR <rankin@nethack.org>
Sun, 31 May 2015 01:22:14 +0000 (18:22 -0700)
committerPatR <rankin@nethack.org>
Sun, 31 May 2015 01:22:14 +0000 (18:22 -0700)
commit24b4872e2f1b34837c0655ac41a59a2c4e236896
tree18bdb4f6d65b43ca5358cf62b5bebdfdcbdc9a5c
parentda64f26844685dff18e9735d1945063ffe2a04bb
get_cost_from_price

I couldn't figure out why walking over a container in a shop might
give the wrong price; the code looks correct.  But I've reorganized
get_cost_from_price to perform the cheapest tests first.  The u.ushops
check should probably be done in doname to avoid calling this routine
at all 99.99% of the time.
src/shk.c