Skip to content

Commit

Permalink
* src/extras/libc.c: forgot a small modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gildas Bazin committed Sep 9, 2004
1 parent ca948c0 commit 7c239ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/extras/libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ vlc_bool_t vlc_reduce( int *pi_dst_nom, int *pi_dst_den,

if( i_den == 0 )
{
i_nom = 0;
i_den = 1;
*pi_dst_nom = 0;
*pi_dst_den = 1;
return 1;
}

Expand All @@ -455,6 +455,8 @@ vlc_bool_t vlc_reduce( int *pi_dst_nom, int *pi_dst_den,
i_nom /= i_gcd;
i_den /= i_gcd;

if( i_max == 0 ) i_max = I64C(0xFFFFFFFF);

if( i_nom > i_max || i_den > i_max )
{
int i_a0_num = 0, i_a0_den = 1, i_a1_num = 1, i_a1_den = 0;
Expand Down

0 comments on commit 7c239ef

Please sign in to comment.