Fix CSS format strings, they could print more than two digits for

"negative" numbers.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23727 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-07-06 22:07:35 +00:00
parent fe1f9712f3
commit 7138540983
1 changed files with 2 additions and 2 deletions

View File

@ -472,7 +472,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
{
char psz_tmp[16 + 1];
sprintf( psz_tmp,
"%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x",
"%.2"PRIx8"%.2"PRIx8"%.2"PRIx8"%.2"PRIx8"%.2"PRIx8"%.2"PRIx8"%.2"PRIx8"%.2"PRIx8"",
psz_serial[0], psz_serial[1], psz_serial[2],
psz_serial[3], psz_serial[4], psz_serial[5],
psz_serial[6], psz_serial[7] );
@ -488,7 +488,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
psz_key[0] = '-';
for( i = 0; i < KEY_SIZE; i++ )
{
sprintf( &psz_key[1+i*2], "%.2x", dvdcss->css.p_disc_key[i] );
sprintf( &psz_key[1+i*2], "%.2"PRIx8, dvdcss->css.p_disc_key[i] );
}
psz_key[1 + KEY_SIZE * 2] = '\0';
}