修复nack fci相关bug

This commit is contained in:
ziyue 2021-07-28 12:20:16 +08:00
parent 5c52c636a3
commit 55fc598d4c

View File

@ -155,13 +155,14 @@ string FCI_REMB::dumpString() const {
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FCI_NACK::FCI_NACK(uint16_t pid_h, const vector<bool> &type) {
assert(type.size() <= kBitSize);
uint16_t blp_h = 0;
int i = kBitSize;
int i = 0;
for (auto item : type) {
--i;
if (item) {
blp_h |= (1 << i);
}
++i;
}
blp = htons(blp_h);
pid = htons(pid_h);
@ -187,7 +188,7 @@ vector<bool> FCI_NACK::getBitArray() const {
auto blp_h = getBlp();
for (size_t i = 0; i < kBitSize; ++i) {
ret[i + 1] = blp_h & (1 << (kBitSize - i - 1));
ret[i + 1] = blp_h & (1 << i);
}
return ret;
}