aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-05-31 17:19:53 +0200
committerlaforge <laforge@gnumonks.org>2019-06-13 21:26:12 +0000
commit3f640773f3dc68f3af11bc3eb48624a542af533a (patch)
tree590eb28637dd93a2925893c79009a6e5a55cd665
parent5c3783b7e83b586d72304d798b195bffa1a53ba2 (diff)
encoding: correct encoding of CRBB in ACK/NACK when not byte aligned
The last bits of the CRBB (compressed receive block bitmap) was incorrect encoded when the CRBB is not byte aligned. Related: OS#3728 Change-Id: I7261aa71b37d7ead52992f8db462f72a3804988e
-rw-r--r--src/encoding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 1b325b4..b6879cc 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -965,7 +965,7 @@ static void write_packet_ack_nack_desc_egprs(
crbb_len = crbb_len - 8;
iter++;
} else {
- bitvec_write_field(dest, &wp, crbb_bitmap[iter], crbb_len);
+ bitvec_write_field(dest, &wp, crbb_bitmap[iter] >> (8 - crbb_len), crbb_len);
crbb_len = 0;
}
}