Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 696ff9f

Browse filesBrowse files
committed
Merge pull request #5436 from jenshnielsen/backport5432
Merge pull request #5432 from mdboom/fix-segfault-in-text-drawing
2 parents 4a2a186 + 5129136 commit 696ff9f
Copy full SHA for 696ff9f

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎src/_backend_agg.h

Copy file name to clipboardExpand all lines: src/_backend_agg.h
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,11 @@ inline void RendererAgg::draw_text_image(GCAgg &gc, ImageArray &image, int x, in
788788
text.clip(clip);
789789
}
790790

791-
for (int yi = text.y1; yi < text.y2; ++yi) {
792-
pixFmt.blend_solid_hspan(text.x1, yi, (text.x2 - text.x1), gc.color,
793-
&image(yi - (y - image.dim(0)), text.x1 - x));
791+
if (text.x2 > text.x1) {
792+
for (int yi = text.y1; yi < text.y2; ++yi) {
793+
pixFmt.blend_solid_hspan(text.x1, yi, (text.x2 - text.x1), gc.color,
794+
&image(yi - (y - image.dim(0)), text.x1 - x));
795+
}
794796
}
795797
}
796798
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.