In patter.cpp, line 95-100, a bool array is constructed. If the last loci is 100 (bsize==100), the bool array should be constructed in a 100 + 1 size. If we make a bool array with 100 elements, we cant access the conv[100].
bsize = loci.at(loci.size() - 1);
conv = new bool[bsize](); --> conv = new bool[(bsize + 1)]();
for (int locus: loci) {
conv[locus] = true;
}
In line 254, we also need add 1 to make the code assess to the last locus of the chromosome:
In patter.cpp, line 95-100, a bool array is constructed. If the last loci is 100 (bsize==100), the bool array should be constructed in a 100 + 1 size. If we make a bool array with 100 elements, we cant access the conv[100].
In line 254, we also need add 1 to make the code assess to the last locus of the chromosome: