aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Vogel <vogelchr@vogel.cx>2011-01-22 22:48:37 +0100
committerChristian Vogel <vogelchr@vogel.cx>2011-01-22 22:48:37 +0100
commitc7f84e91b7a8142d445734dde46d26a3fecff6f3 (patch)
tree8086bc9ac4ad68694439d16de2652ba4aa15e15e /src
parentaeb10770510decf85797c8768285641639be9026 (diff)
ubit2pbit flushes at the wrong moment, added one note to bits.h
(e.g. input2[] test sequence from testra/crc_test decodes incorrectly to packed bits: 90 b0 3e 80 03 87 53 bd 6f 08, this patch fixes it)
Diffstat (limited to 'src')
-rw-r--r--src/bits.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bits.c b/src/bits.c
index 029cfe55..fcdf5cc3 100644
--- a/src/bits.c
+++ b/src/bits.c
@@ -15,7 +15,7 @@ int osmo_ubit2pbit(pbit_t *out, const ubit_t *in, unsigned int num_bits)
curbyte |= (in[i] << bitnum);
- if (i > 0 && i % 8 == 0) {
+ if(i % 8 == 7){
*outptr++ = curbyte;
curbyte = 0;
}