Skip to content

Commit a9d00ba

Browse files
authored
Merge pull request #412 from iqtree/fix
Fixed the issue #411 of initial tree not compatible with constraint tree
2 parents 4b6f4bd + 3526e7e commit a9d00ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pda/split.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ void Split::invert() {
9393
for (iterator uit = begin(); uit != end(); uit++)
9494
{
9595
int num_bits = (uit+1 == end()) ? ntaxa % UINT_BITS : UINT_BITS;
96+
if (num_bits == 0) num_bits = UINT_BITS; // for the case when ntaxa % UINT_BITS == 0
9697

9798
*uit = (1 << (num_bits-1)) - 1 + (1 << (num_bits-1)) - (*uit);
9899
}

0 commit comments

Comments
 (0)