Skip to content

Ensure exceeding max chunk size doesn't forbid splits

I was playing around with the buzhash implementation in this repo for https://github.com/aidanhs/rollsum-tests and I noticed that it seemed to be not working properly (would only generate a few chunks for a massive file, and the last chunk would be huge).

A look at the code revealed that the condition to split on hitting the max chunk size was effectively inverted, so once hitting the max chunk size it would never split!

Merge request reports