Skip to content

Commit

Permalink
Merge pull request #2 from joshka/dev
Browse files Browse the repository at this point in the history
fix: crash when there are more than 8 wifi networks
  • Loading branch information
Chleba authored Feb 10, 2024
2 parents 6dbc9bd + f9031c7 commit fd9668b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ping = "0.5.1"
pnet = "0.34.0"
pretty_assertions = "1.4.0"
rand = "0.8.5"
ratatui = { version = "0.25.0", features = ["serde", "macros"] }
ratatui = { version = "0.26.0", features = ["serde", "macros"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
signal-hook = "0.3.17"
Expand Down
2 changes: 1 addition & 1 deletion src/components/wifi_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl WifiScan {
channel: w.channel.parse::<u8>().unwrap_or(0),
signal: w.signal_level.parse::<f32>().unwrap_or(-100.00),
mac: w.mac.clone(),
color: COLORS_NAMES[wifi_nets.len()],
color: COLORS_NAMES[wifi_nets.len() % COLORS_NAMES.len()],
});
}
}
Expand Down

0 comments on commit fd9668b

Please sign in to comment.