Skip to content

Commit b6a70bd

Browse files
prevent exception in split when enter is pressed without any input in network (wifi) selection
1 parent 5f10234 commit b6a70bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ESP32/main.ino

+2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ void configure_network(console *const c)
152152
c->flush_input();
153153

154154
std::string wifi_ap = c->read_line("Enter SSID[|PSK]: ");
155+
if (wifi_ap.empty())
156+
return;
155157

156158
auto parts = split(wifi_ap, "|");
157159
if (parts.size() > 2) {

0 commit comments

Comments
 (0)