prevent exception in split when enter is pressed without any input in network (wifi) selection
This commit is contained in:
parent
5f102348b6
commit
b6a70bd037
1 changed files with 2 additions and 0 deletions
|
@ -152,6 +152,8 @@ void configure_network(console *const c)
|
|||
c->flush_input();
|
||||
|
||||
std::string wifi_ap = c->read_line("Enter SSID[|PSK]: ");
|
||||
if (wifi_ap.empty())
|
||||
return;
|
||||
|
||||
auto parts = split(wifi_ap, "|");
|
||||
if (parts.size() > 2) {
|
||||
|
|
Loading…
Add table
Reference in a new issue