fix bitset bug

This commit is contained in:
mrkraimer
2020-04-08 11:06:59 -04:00
parent 2f7c82757f
commit ad479309b0

View File

@ -174,7 +174,7 @@ bool PVArrayFilter::filter(const PVFieldPtr & pvField,const BitSetPtr & bitSet,b
if (end < 0) end = 0; if (end < 0) end = 0;
} }
if(toCopy) { if(toCopy) {
if (end >= no_elements) end = no_elements - 1; if (end >= no_elements) end = no_elements - 1;
if (end - start >= 0) len = 1 + (end - start) / increment; if (end - start >= 0) len = 1 + (end - start) / increment;
if(len<=0 || start>=no_elements) { if(len<=0 || start>=no_elements) {
@ -194,7 +194,6 @@ bool PVArrayFilter::filter(const PVFieldPtr & pvField,const BitSetPtr & bitSet,b
} }
} }
copyArray->setLength(len); copyArray->setLength(len);
bitSet->set(masterField->getFieldOffset());
return true; return true;
} }
if (end - start >= 0) len = 1 + (end - start) / increment; if (end - start >= 0) len = 1 + (end - start) / increment;