prevent exception in split when enter is pressed without any input in network (wifi) selection

This commit is contained in:
folkert van heusden 2024-06-19 14:25:48 +02:00
parent 5f102348b6
commit b6a70bd037
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -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) {