diff options
| author | Eli Zaretskii | 2021-11-27 17:09:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-11-27 17:09:51 +0200 |
| commit | a89731a78c8cb019a18d2e70fe43d21286d88ab1 (patch) | |
| tree | 8717aa29c4c26eca2eebca9c4e8d0eb40094320a | |
| parent | f97539876af597e2497bfde68a68878166406302 (diff) | |
| download | emacs-a89731a78c8cb019a18d2e70fe43d21286d88ab1.tar.gz emacs-a89731a78c8cb019a18d2e70fe43d21286d88ab1.zip | |
Avoid assertion violations in --enable-checking builds
* src/xdisp.c (gui_produce_glyphs): Make sure character glyphs
don't trigger assertion violation due to negative ascent or
descent. This was reporte dto happen with some fonts used by the
xfont backend.
| -rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 24049ab4e33..9f93799783d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -31199,6 +31199,11 @@ gui_produce_glyphs (struct it *it) | |||
| 31199 | it->max_ascent = max (it->max_ascent, font_ascent); | 31199 | it->max_ascent = max (it->max_ascent, font_ascent); |
| 31200 | it->max_descent = max (it->max_descent, font_descent); | 31200 | it->max_descent = max (it->max_descent, font_descent); |
| 31201 | } | 31201 | } |
| 31202 | |||
| 31203 | if (it->ascent < 0) | ||
| 31204 | it->ascent = 0; | ||
| 31205 | if (it->descent < 0) | ||
| 31206 | it->descent = 0; | ||
| 31202 | } | 31207 | } |
| 31203 | else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0) | 31208 | else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0) |
| 31204 | { | 31209 | { |