Commit 5f26e7d3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

libass: avoid negative index in array

(cherry picked from commit e91ea1f9c3f5575c65003818b6b0c2948435c2b8)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f819406d
......@@ -627,6 +627,8 @@ static int BuildRegions( rectangle_t *p_region, int i_max_region, ASS_Image *p_i
#ifdef DEBUG_REGION
msg_Err( p_spu, "Merging %d and %d", i_best_i, i_best_j );
#endif
if( i_best_j >= 0 && i_best_i >= 0 )
{
r_add( &region[i_best_i], &region[i_best_j] );
if( i_best_j+1 < i_region )
......@@ -634,6 +636,7 @@ static int BuildRegions( rectangle_t *p_region, int i_max_region, ASS_Image *p_i
i_region--;
}
}
}
/* */
for( int n = 0; n < i_region; n++ )
......
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