Harvind found a bug in BitVector.cpp:
Basically the unpack method and fillField method assume MSB-first bit packing. The unpack method calls fillField for each byte that needs to be unpacked. The problem occurs on its final call to fillField when it has a partial byte to unpack; it uses the LSB bits instead of the MSB bits. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3288 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
3b5c0c1e91
commit
7645fcaa5d
|
@ -564,7 +564,7 @@ void BitVector::unpack(const unsigned char* src)
|
|||
unsigned whole = bytes*8;
|
||||
unsigned rem = size() - whole;
|
||||
if (rem==0) return;
|
||||
fillField(whole,src[bytes],rem);
|
||||
fillField(whole,src[bytes] >> (8-rem),rem);
|
||||
}
|
||||
|
||||
void BitVector::hex(ostream& os) const
|
||||
|
|
Loading…
Reference in New Issue