[DVDnav-discuss] r1177 - trunk/libdvdread/src/ifo_read.c
erik
subversion at mplayerhq.hu
Wed Sep 2 03:43:18 CEST 2009
Author: erik
Date: Wed Sep 2 03:43:18 2009
New Revision: 1177
Log:
Use parens to make the 'is present' mask explicit
W/o parens the check for the 'is present' mask will not work right
because the ! operator will evaluate first. But by wrapping the
& operation in parens, we make it explicit that this goes first.
And so the is present flag will be properly evaluated in the
conditional
Modified:
trunk/libdvdread/src/ifo_read.c
Modified: trunk/libdvdread/src/ifo_read.c
==============================================================================
--- trunk/libdvdread/src/ifo_read.c Wed Sep 2 03:34:23 2009 (r1176)
+++ trunk/libdvdread/src/ifo_read.c Wed Sep 2 03:43:18 2009 (r1177)
@@ -844,10 +844,10 @@ static int ifoRead_PGC(ifo_handle_t *ifo
/* verify time (look at print_time) */
for(i = 0; i < 8; i++)
- if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
+ if(!(pgc->audio_control[i] & 0x8000)) /* The 'is present' bit */
CHECK_ZERO(pgc->audio_control[i]);
for(i = 0; i < 32; i++)
- if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
+ if(!(pgc->subp_control[i] & 0x80000000)) /* The 'is present' bit */
CHECK_ZERO(pgc->subp_control[i]);
/* Check that time is 0:0:0:0 also if nr_of_programs == 0 */
More information about the DVDnav-discuss
mailing list