Mercurial > mplayer.hg
changeset 23707:552963611d77
Fix CSS format strings, they could print more than two digits for
"negative" numbers.
author | reimar |
---|---|
date | Fri, 06 Jul 2007 22:07:35 +0000 |
parents | 088fa7bde511 |
children | 1fb5f0b13a1a |
files | libdvdcss/libdvdcss.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libdvdcss/libdvdcss.c Fri Jul 06 19:38:54 2007 +0000 +++ b/libdvdcss/libdvdcss.c Fri Jul 06 22:07:35 2007 +0000 @@ -472,7 +472,7 @@ { 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 @@ 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'; }