Commit 5d992293 authored by François Cartegnie's avatar François Cartegnie 🤞

text_renderer: freetype: fix oob

parent a83f896e
......@@ -1364,8 +1364,6 @@ static int LayoutParagraph( filter_t *p_filter, paragraph_t *p_paragraph,
for( int i = 0; i <= p_paragraph->i_size; ++i )
{
const run_desc_t *p_run = &p_paragraph->p_runs[p_paragraph->pi_run_ids[i]];
if( i == p_paragraph->i_size )
{
if( i_line_start < i )
......@@ -1405,6 +1403,8 @@ static int LayoutParagraph( filter_t *p_filter, paragraph_t *p_paragraph,
i_last_space_width = i_width;
}
const run_desc_t *p_run = &p_paragraph->p_runs[p_paragraph->pi_run_ids[i]];
i_width += p_paragraph->p_glyph_bitmaps[ i ].i_x_advance;
if( ( i_last_space_width >= i_preferred_width && p_run->p_style->e_wrapinfo == STYLE_WRAP_DEFAULT )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment