diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c index a77e5729b5b..43972109655 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1676,6 +1676,7 @@ append_composite_glyph (struct it *it) | |||
| 1676 | glyph = it->glyph_row->glyphs[it->area]; | 1676 | glyph = it->glyph_row->glyphs[it->area]; |
| 1677 | } | 1677 | } |
| 1678 | glyph->type = COMPOSITE_GLYPH; | 1678 | glyph->type = COMPOSITE_GLYPH; |
| 1679 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 1679 | glyph->pixel_width = it->pixel_width; | 1680 | glyph->pixel_width = it->pixel_width; |
| 1680 | glyph->u.cmp.id = it->cmp_it.id; | 1681 | glyph->u.cmp.id = it->cmp_it.id; |
| 1681 | if (it->cmp_it.ch < 0) | 1682 | if (it->cmp_it.ch < 0) |
diff --git a/src/xdisp.c b/src/xdisp.c index 5be94f0cd07..cc2c951ce5c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -25828,6 +25828,7 @@ append_glyph (struct it *it) | |||
| 25828 | glyph->object = it->object; | 25828 | glyph->object = it->object; |
| 25829 | if (it->pixel_width > 0) | 25829 | if (it->pixel_width > 0) |
| 25830 | { | 25830 | { |
| 25831 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 25831 | glyph->pixel_width = it->pixel_width; | 25832 | glyph->pixel_width = it->pixel_width; |
| 25832 | glyph->padding_p = false; | 25833 | glyph->padding_p = false; |
| 25833 | } | 25834 | } |
| @@ -25908,6 +25909,7 @@ append_composite_glyph (struct it *it) | |||
| 25908 | } | 25909 | } |
| 25909 | glyph->charpos = it->cmp_it.charpos; | 25910 | glyph->charpos = it->cmp_it.charpos; |
| 25910 | glyph->object = it->object; | 25911 | glyph->object = it->object; |
| 25912 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 25911 | glyph->pixel_width = it->pixel_width; | 25913 | glyph->pixel_width = it->pixel_width; |
| 25912 | glyph->ascent = it->ascent; | 25914 | glyph->ascent = it->ascent; |
| 25913 | glyph->descent = it->descent; | 25915 | glyph->descent = it->descent; |
| @@ -26117,7 +26119,7 @@ produce_image_glyph (struct it *it) | |||
| 26117 | { | 26119 | { |
| 26118 | glyph->charpos = CHARPOS (it->position); | 26120 | glyph->charpos = CHARPOS (it->position); |
| 26119 | glyph->object = it->object; | 26121 | glyph->object = it->object; |
| 26120 | glyph->pixel_width = it->pixel_width; | 26122 | glyph->pixel_width = clip_to_bounds (-1, it->pixel_width, SHRT_MAX); |
| 26121 | glyph->ascent = glyph_ascent; | 26123 | glyph->ascent = glyph_ascent; |
| 26122 | glyph->descent = it->descent; | 26124 | glyph->descent = it->descent; |
| 26123 | glyph->voffset = it->voffset; | 26125 | glyph->voffset = it->voffset; |
| @@ -26221,7 +26223,7 @@ produce_xwidget_glyph (struct it *it) | |||
| 26221 | { | 26223 | { |
| 26222 | glyph->charpos = CHARPOS (it->position); | 26224 | glyph->charpos = CHARPOS (it->position); |
| 26223 | glyph->object = it->object; | 26225 | glyph->object = it->object; |
| 26224 | glyph->pixel_width = it->pixel_width; | 26226 | glyph->pixel_width = clip_to_bounds (-1, it->pixel_width, SHRT_MAX); |
| 26225 | glyph->ascent = glyph_ascent; | 26227 | glyph->ascent = glyph_ascent; |
| 26226 | glyph->descent = it->descent; | 26228 | glyph->descent = it->descent; |
| 26227 | glyph->voffset = it->voffset; | 26229 | glyph->voffset = it->voffset; |
| @@ -26307,7 +26309,9 @@ append_stretch_glyph (struct it *it, Lisp_Object object, | |||
| 26307 | } | 26309 | } |
| 26308 | glyph->charpos = CHARPOS (it->position); | 26310 | glyph->charpos = CHARPOS (it->position); |
| 26309 | glyph->object = object; | 26311 | glyph->object = object; |
| 26310 | glyph->pixel_width = width; | 26312 | /* FIXME: It would be better to use TYPE_MAX here, but |
| 26313 | __typeof__ is not portable enough... */ | ||
| 26314 | glyph->pixel_width = clip_to_bounds (-1, width, SHRT_MAX); | ||
| 26311 | glyph->ascent = ascent; | 26315 | glyph->ascent = ascent; |
| 26312 | glyph->descent = height - ascent; | 26316 | glyph->descent = height - ascent; |
| 26313 | glyph->voffset = it->voffset; | 26317 | glyph->voffset = it->voffset; |
| @@ -26758,6 +26762,7 @@ append_glyphless_glyph (struct it *it, int face_id, bool for_no_font, int len, | |||
| 26758 | } | 26762 | } |
| 26759 | glyph->charpos = CHARPOS (it->position); | 26763 | glyph->charpos = CHARPOS (it->position); |
| 26760 | glyph->object = it->object; | 26764 | glyph->object = it->object; |
| 26765 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 26761 | glyph->pixel_width = it->pixel_width; | 26766 | glyph->pixel_width = it->pixel_width; |
| 26762 | glyph->ascent = it->ascent; | 26767 | glyph->ascent = it->ascent; |
| 26763 | glyph->descent = it->descent; | 26768 | glyph->descent = it->descent; |