]> granicus.if.org Git - nethack/commitdiff
sortloot of tools
authorPatR <rankin@nethack.org>
Fri, 4 Oct 2019 23:37:14 +0000 (16:37 -0700)
committerPatR <rankin@nethack.org>
Fri, 4 Oct 2019 23:37:14 +0000 (16:37 -0700)
Fix the first part of github issue 229.  sortloot_classify() tries to
group musical instruments separately from other tools, but missing
'break' in a 'switch' prevented that from happening--they were mixed
together.

Since that grouping isn't documented anywhere, only source divers
would ever notice that it wasn't working as intended.

doc/fixes36.3
src/invent.c

index d39eff5c6585112c845960f8ffc98b6eba79f434..5ea4594ccdc2fb7d3130d9951459a2c9556bb309 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.123 $ $NHDT-Date: 1570230710 2019/10/04 23:11:50 $
+$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.124 $ $NHDT-Date: 1570232224 2019/10/04 23:37:04 $
 
 This fixes36.3 file is here to capture information about updates in the 3.6.x
 lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -171,6 +171,8 @@ ball and chain could end up too far from punished hero (triggering b&c warning
 avoid 'object lost' panic when polymorph causes loss of levitation boots or
        water walking boots which dumps hero into water where emergency
        disrobing/dropping in order to crawl out chooses to drop those boots
+'sortloot's attempt to group musical instruments separately from other tools
+       didn't work as intended due to missing 'break' in sortloot_classify()
 
 
 Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
index 1f8bae8c43670a33284c8da4d0a53fc9124f45cb..01c252b897c79d23127cae962ec24625e8b70bf3 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 invent.c        $NHDT-Date: 1567213892 2019/08/31 01:11:32 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.262 $ */
+/* NetHack 3.6 invent.c        $NHDT-Date: 1570232224 2019/10/04 23:37:04 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.263 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -141,8 +141,10 @@ struct obj *obj;
             case DRUM_OF_EARTHQUAKE:
             case HORN_OF_PLENTY: /* not a musical instrument */
                 k = 3; /* instrument or unknown horn of plenty */
+                break;
             default:
                 k = 4; /* 'other' tool */
+                break;
             }
         break;
     case FOOD_CLASS: