diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index a47b17a31..2b459756d 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh @@ -217,7 +217,7 @@ struct hb_set_t } inline void add_range (hb_codepoint_t a, hb_codepoint_t b) { - if (unlikely (in_error)) return; + if (unlikely (in_error || a > b)) return; unsigned int ma = get_major (a); unsigned int mb = get_major (b); if (ma == mb)