From 87a0bdf26c851f5da2a48279c0d647e25dde5e2b Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Mon, 25 May 2026 17:06:24 +0200 Subject: [PATCH] display: fix off-by-one in glyph_is_normal_piletop_obj glyph_is_normal_object includes its boundary slot GLYPH_OBJ_OFF + FIRST_OBJECT - 1 via >=, but its piletop sibling glyph_is_normal_piletop_obj used > and excluded the matching GLYPH_OBJ_PILETOP_OFF + FIRST_OBJECT - 1 slot. That leaves exactly one glyph (the would-be G_piletop_generic_venom) matching neither the piletop-generic nor the piletop-normal predicate, so parse_id never builds a name for it and --dumpglyphnames emits a blank line for the slot. Change > to >= so the two ranges are inclusive on the same side. --dumpglyphnames now produces (8009) G_piletop_generic_venom. --- include/display.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/display.h b/include/display.h index a48883342..0518a6a2b 100644 --- a/include/display.h +++ b/include/display.h @@ -846,7 +846,7 @@ enum glyph_offsets { || glyph_is_piletop_generic_obj(glyph)) #define glyph_is_normal_piletop_obj(glyph) \ ((glyph) == GLYPH_OBJ_PILETOP_OFF \ - || ((glyph) > GLYPH_OBJ_PILETOP_OFF + FIRST_OBJECT - 1 \ + || ((glyph) >= GLYPH_OBJ_PILETOP_OFF + FIRST_OBJECT - 1 \ && (glyph) < (GLYPH_OBJ_PILETOP_OFF + NUM_OBJECTS))) #define glyph_is_normal_object(glyph) \ ((glyph) == GLYPH_OBJ_OFF \