Commit 4c8a6232 authored by François Cartegnie's avatar François Cartegnie 🤞

text_renderer: freetype: fix off by one char for > 2nd background

parent e3c33628
......@@ -765,8 +765,8 @@ static inline void RenderBackground( subpicture_region_t *p_region,
{
/* find last char having the same style */
int i_seg_end = i_char_index;
while( i_seg_end < p_line->i_last_visible_char_index &&
p_prev_style == p_line->p_character[i_seg_end].p_style )
while( i_seg_end + 1 <= p_line->i_last_visible_char_index &&
p_prev_style == p_line->p_character[i_seg_end + 1].p_style )
{
i_seg_end++;
}
......
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