Just noticed that I forgot to reset the worker to midpoint in the search.

This doesn't actually matter, except in an unfortunate edge case that turns out
to never happen.
This commit is contained in:
2020-12-01 08:46:56 -08:00
parent 1cb05050b3
commit e6be53686f

View File

@@ -108,6 +108,7 @@ fn next_target(low_index: usize, high_index: usize, avoid: &[usize]) -> Option<u
}
}
worker = midpoint;
while worker <= high_index {
if avoid.contains(&worker) {
worker += 1;