[xiph-commits] r9309 - trunk/speex/libspeex

jm at motherfish-iii.xiph.org jm at motherfish-iii.xiph.org
Tue May 24 22:06:33 PDT 2005


Author: jm
Date: 2005-05-24 22:06:31 -0700 (Tue, 24 May 2005)
New Revision: 9309

Modified:
   trunk/speex/libspeex/bits.c
Log:
Should fix a bug for platforms where a char is 16 bits.


Modified: trunk/speex/libspeex/bits.c
===================================================================
--- trunk/speex/libspeex/bits.c	2005-05-25 02:30:31 UTC (rev 9308)
+++ trunk/speex/libspeex/bits.c	2005-05-25 05:06:31 UTC (rev 9309)
@@ -243,10 +243,10 @@
    {
       int bit;
       bit = (d>>(nbBits-1))&1;
-      bits->chars[bits->charPtr] |= bit<<(7-bits->bitPtr);
+      bits->chars[bits->charPtr] |= bit<<(BITS_PER_CHAR-1-bits->bitPtr);
       bits->bitPtr++;
 
-      if (bits->bitPtr==8)
+      if (bits->bitPtr==BITS_PER_CHAR)
       {
          bits->bitPtr=0;
          bits->charPtr++;



More information about the commits mailing list