Commit 63f3165a authored by jm's avatar jm
Browse files

Should fix a bug for platforms where a char is 16 bits.


git-svn-id: http://svn.xiph.org/trunk/speex@9309 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent aab3e2b6
......@@ -243,10 +243,10 @@ void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
{
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++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment