diff options
author | Mattias Andrée <maandree@kth.se> | 2021-11-21 09:30:54 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-11-21 09:30:54 +0100 |
commit | d091e2355276a8632c5bc1c296189ad0aac2673b (patch) | |
tree | 8b7509757f06c697e32c9e2a7bfebf5a72190c2a | |
parent | Implement libfonts_decode_font_description (diff) | |
download | libfonts-d091e2355276a8632c5bc1c296189ad0aac2673b.tar.gz libfonts-d091e2355276a8632c5bc1c296189ad0aac2673b.tar.bz2 libfonts-d091e2355276a8632c5bc1c296189ad0aac2673b.tar.xz |
Fix union of overlapping charset subset ranges
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | libfonts_decode_font_description.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libfonts_decode_font_description.c b/libfonts_decode_font_description.c index 329d338..83cf5c2 100644 --- a/libfonts_decode_font_description.c +++ b/libfonts_decode_font_description.c @@ -118,7 +118,8 @@ fix_charset_subset(char *out, const char *in) saved = ranges[0]; for (i = 1; i < n; i++) { if (ranges[i].first <= saved.last) { - saved.last = ranges[i].last; + if (ranges[i].last > saved.last) + saved.last = ranges[i].last; } else { if (saved.first == saved.last) out += sprintf(out, "%"PRId32" ", saved.first); |