Previously bup would allow MAX_PER_TREE + 1 items in a tree. Change
the guard to ensure that trees really are limited to MAX_PER_TREE.
Thanks to Patrick Rouleau <prouleau72@gmail.com> for reporting the
problem.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
def _squish(maketree, stacks, n):
i = 0
- while i<n or len(stacks[i]) > MAX_PER_TREE:
+ while i < n or len(stacks[i]) >= MAX_PER_TREE:
while len(stacks) <= i+1:
stacks.append([])
if len(stacks[i]) == 1: