diff decoder.c @ 166:3bfaec0c1288 src

* fix warnings with gcc 3.3 * some menu sanity checking in highlight.c (the button functions should do nothing, when called outside a menu) * escape should take us to the Root menu, not the Title menu, since this is what the standard "Menu" button on a DVD player does
author mroi
date Mon, 21 Apr 2003 13:18:06 +0000
parents a68751e6e84f
children 90b1f6f0520e
line wrap: on
line diff
--- a/decoder.c	Tue Apr 08 13:51:55 2003 +0000
+++ b/decoder.c	Mon Apr 21 13:18:06 2003 +0000
@@ -36,10 +36,10 @@
 
 uint32_t vm_getbits(command_t *command, int start, int count) {
   uint64_t result = 0;
-  uint64_t bit_mask=0xffffffffffffffff;  /* I could put -1 instead */
+  uint64_t bit_mask = 0;
   uint64_t examining = 0;
   int32_t  bits;
-
+  
   if (count == 0) return 0;
 
   if ( ((start - count) < -1) ||
@@ -50,6 +50,8 @@
     fprintf(MSG_OUT, "libdvdnav: Bad call to vm_getbits. Parameter out of range\n");
     assert(0);
   }
+  /* all ones, please */
+  bit_mask = ~bit_mask;
   bit_mask >>= 63 - start;
   bits = start + 1 - count;
   examining = ((bit_mask >> bits) << bits );