[MPlayer-cvslog] r23727 - trunk/libdvdcss/libdvdcss.c

reimar subversion at mplayerhq.hu
Sat Jul 7 00:07:36 CEST 2007


Author: reimar
Date: Sat Jul  7 00:07:35 2007
New Revision: 23727

Log:
Fix CSS format strings, they could print more than two digits for
"negative" numbers.


Modified:
   trunk/libdvdcss/libdvdcss.c

Modified: trunk/libdvdcss/libdvdcss.c
==============================================================================
--- trunk/libdvdcss/libdvdcss.c	(original)
+++ trunk/libdvdcss/libdvdcss.c	Sat Jul  7 00:07:35 2007
@@ -472,7 +472,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( 
             {
                 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 ( 
              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';
         }



More information about the MPlayer-cvslog mailing list