Skip to content

Commit

Permalink
fix default mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Aug 12, 2024
1 parent b75e798 commit c8bb52c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ impl ModePicker {

// if they're all 0, pick Slash0.
// this mostly fixes a bug where some modes panic when the database is empty.
if self.modes.values().all(|&count| count == 0) {
if self
.modes
.values()
.all(|&count| count == 0 || count == 1_000_000)
{
return ScanMode::Slash0;
}

Expand Down

0 comments on commit c8bb52c

Please sign in to comment.