[xiph-cvs] cvs commit: ogg/src bitwise.c

Monty xiphmont at xiph.org
Sun Mar 7 20:10:01 PST 2004



xiphmont    04/03/07 23:10:01

  Modified:    src      bitwise.c
  Log:
  Fix for bug 498
  
  (B_look() and B_read() broken on 64 bit archs)

Revision  Changes    Path
1.18      +4 -4      ogg/src/bitwise.c

Index: bitwise.c
===================================================================
RCS file: /usr/local/cvsroot/ogg/src/bitwise.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- bitwise.c	10 Nov 2003 13:06:08 -0000	1.17
+++ bitwise.c	8 Mar 2004 04:10:00 -0000	1.18
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function: packing variable sized words into an octet stream
-  last mod: $Id: bitwise.c,v 1.17 2003/11/10 13:06:08 xiphmont Exp $
+  last mod: $Id: bitwise.c,v 1.18 2004/03/08 04:10:00 xiphmont Exp $
 
  ********************************************************************/
 
@@ -170,7 +170,7 @@
       b->ptr=b->buffer+b->endbyte;
     }
 
-    memmove(b->ptr,source,bytes);
+    bcopy(source,b->ptr,bytes);
     b->ptr+=bytes;
     b->buffer+=bytes;
     *b->ptr=0;
@@ -272,7 +272,7 @@
       }
     }
   }
-  return (ret>>(m>>1))>>((m+1)>>1);
+  return ((ret&0xffffffff)>>(m>>1))>>((m+1)>>1);
 }
 
 long oggpack_look1(oggpack_buffer *b){
@@ -369,7 +369,7 @@
       }
     }
   }
-  ret=(ret>>(m>>1))>>((m+1)>>1);
+  ret=((ret&0xffffffff)>>(m>>1))>>((m+1)>>1);
   
  overflow:
 

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list