scala-rrb-vector
scala-rrb-vector copied to clipboard
cleanTopDrop can create trees with incorrect depth
cleanTopDrop compares sections of the cutIndex with the length of display nodes, for example:
if ((cutIndex >> 5) == display1.length - 2) {
The problem is that the cutIndex is not masked after shifting, which means that the comparison can fail when it should succeed, causing the newDepth to be too high.