From f11f4de057d0aca3c843825e55a1d783c90705c2 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 4 Oct 2019 16:37:14 -0700 Subject: [PATCH] sortloot of tools 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 | 4 +++- src/invent.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d39eff5c6..5ea4594cc 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -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 diff --git a/src/invent.c b/src/invent.c index 1f8bae8c4..01c252b89 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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: