fix glyph_to_cmap() odd macro results
Some discrepencies between glyph_is_cmap and glyph_to_cmap
arose after b14b830b because the change resulted in
glyph_is_cmap matching on zap beams which weren't accounted
for in the glyph_to_cmap macro. It is unlikely that
glyph_to_cmap will ever be used on such a glyph, but at least
have glyph_to_cmap return a sane value rather than drop through
to the last-resort value (currently NO_GLYPH) which is far
outside the range of the defsyms[] array indices.
This commit is contained in:
@@ -4026,6 +4026,13 @@ wiz_display_macros(void)
|
||||
glyph, test);
|
||||
putstr(win, 0, buf);
|
||||
}
|
||||
if (glyph_is_cmap_zap(glyph)
|
||||
&& !(test >= S_vbeam && test <= S_rslant)) {
|
||||
Sprintf(buf,
|
||||
"glyph_is_zap(glyph=%d) returned non-zap cmap %d",
|
||||
glyph, test);
|
||||
putstr(win, 0, buf);
|
||||
}
|
||||
/* check against defsyms array subscripts */
|
||||
if (test < 0 || test >= SIZE(defsyms)) {
|
||||
if (!trouble++)
|
||||
|
||||
Reference in New Issue
Block a user