changeset 43:6177a05fa534 src

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
author erik
date Wed, 02 Sep 2009 01:43:18 +0000
parents 3aa39a1cff0f
children 92b4694792da
files ifo_read.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ifo_read.c	Wed Sep 02 01:34:23 2009 +0000
+++ b/ifo_read.c	Wed Sep 02 01:43:18 2009 +0000
@@ -844,10 +844,10 @@
 
   /* 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 */