bug fix: we need to handle the last one too

This commit is contained in:
Ahmet Inan 2019-09-30 22:49:03 +02:00
commit c6999ccf52

View file

@ -189,8 +189,10 @@ class LDPCDecoder
if (!((wd[W*i+j]>>d)&1))
bl[d] = out[d];
for (int first = 0, c = 1; c < cnt; ++c) {
if (lo[first].off != lo[c].off) {
if (lo[first].off != lo[c].off || c == cnt-1) {
int last = c - 1;
if (c == cnt-1)
++last;
if (last != first) {
int count = last - first + 1;
wd_t mask = ((1 << count) - 1) << first;