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.
This commit is contained in:
+1
-1
@@ -846,7 +846,7 @@ enum glyph_offsets {
|
|||||||
|| glyph_is_piletop_generic_obj(glyph))
|
|| glyph_is_piletop_generic_obj(glyph))
|
||||||
#define glyph_is_normal_piletop_obj(glyph) \
|
#define glyph_is_normal_piletop_obj(glyph) \
|
||||||
((glyph) == GLYPH_OBJ_PILETOP_OFF \
|
((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)))
|
&& (glyph) < (GLYPH_OBJ_PILETOP_OFF + NUM_OBJECTS)))
|
||||||
#define glyph_is_normal_object(glyph) \
|
#define glyph_is_normal_object(glyph) \
|
||||||
((glyph) == GLYPH_OBJ_OFF \
|
((glyph) == GLYPH_OBJ_OFF \
|
||||||
|
|||||||
Reference in New Issue
Block a user