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
diff --git a/CommonLibs/BitVector.cpp b/CommonLibs/BitVector.cpp
index 1d13dec..54a3edc 100644
--- a/CommonLibs/BitVector.cpp
+++ b/CommonLibs/BitVector.cpp
@@ -564,7 +564,7 @@
 	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