BUG: incorrect bitSet auto-vivify in snappy

- should use bitSet::set() and not bitSet::operator[] to auto-vivify
  out-of-range entries

- use bitSet::test() instead of bitSet::operator[] when testing
  non-const variables - circumvents any potential out-of-range issues.
This commit is contained in:
Mark Olesen
2018-06-07 14:43:10 +02:00
parent 86cd37d144
commit 10941280cb
8 changed files with 28 additions and 29 deletions

View File

@ -2754,9 +2754,9 @@ const
label nMasterFaces = 0;
forAll(isMasterFace, i)
{
if (isMasterFace[i])
if (isMasterFace.test(i))
{
nMasterFaces++;
++nMasterFaces;
}
}
@ -2764,9 +2764,9 @@ const
label nMasterPoints = 0;
forAll(isMeshMasterPoint, i)
{
if (isMeshMasterPoint[i])
if (isMeshMasterPoint.test(i))
{
nMasterPoints++;
++nMasterPoints;
}
}