vlc | branch: master | Francois Cartegnie <[email protected]> | Wed Jun  7 
10:22:32 2017 +0200| [5d9922930e6a049002654eaec5a3eb3280a250df] | committer: 
Francois Cartegnie

text_renderer: freetype: fix oob

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d9922930e6a049002654eaec5a3eb3280a250df
---

 modules/text_renderer/freetype/text_layout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/text_renderer/freetype/text_layout.c 
b/modules/text_renderer/freetype/text_layout.c
index f9282e731d..a735148301 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -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 )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to