get_bit_position returned a mix of byte position and bit position.

This commit is contained in:
Moritz Bunkus 2003-08-11 21:58:44 +00:00
parent 086d8727a3
commit 8e9f3f98fc

View File

@ -217,7 +217,7 @@ public:
}
int get_bit_position() {
return byte_position - start_of_data + 8 - bits_valid;
return (byte_position - start_of_data) * 8 + 8 - bits_valid;
}
bool skip_bits(unsigned int num) {