Index: vtfontcvt.c =================================================================== --- vtfontcvt.c (revision 292831) +++ vtfontcvt.c (working copy) @@ -109,7 +109,7 @@ static int add_mapping(struct glyph *gl, unsigned int c, unsigned int map_idx) { - struct mapping *mp; + struct mapping *mp, *mp_temp = NULL; struct mapping_list *ml; mapping_total++; @@ -120,10 +120,14 @@ mp->m_length = 0; ml = &maps[map_idx]; - if (TAILQ_LAST(ml, mapping_list) != NULL && - TAILQ_LAST(ml, mapping_list)->m_char >= c) - errx(1, "Bad ordering at character %u\n", c); - TAILQ_INSERT_TAIL(ml, mp, m_list); + TAILQ_FOREACH(mp_temp, ml, m_list) { + if (mp_temp->m_char >= c) + break; + } + if (mp_temp == NULL) + TAILQ_INSERT_TAIL(ml, mp, m_list); + else + TAILQ_INSERT_BEFORE(mp_temp, mp, m_list); map_count[map_idx]++; mapping_unique++;