Skip to content

Commit 3620d14

Browse files
committed
Pass string length when enabling radio
1 parent 1b15985 commit 3620d14

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

supervisor/shared/web_workflow/web_workflow.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ void supervisor_start_web_workflow(void) {
248248

249249
char ssid[33];
250250
char password[64];
251-
size_t ssid_len = 0;
252-
size_t password_len = 0;
253251

254252
os_getenv_err_t result = common_hal_os_getenv_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid));
255253
if (result != GETENV_OK) {
@@ -273,7 +271,7 @@ void supervisor_start_web_workflow(void) {
273271
// network. If we are connected to a different network, then it will disconnect before
274272
// attempting to connect to the given network.
275273
_wifi_status = common_hal_wifi_radio_connect(
276-
&common_hal_wifi_radio_obj, (uint8_t *)ssid, ssid_len, (uint8_t *)password, password_len,
274+
&common_hal_wifi_radio_obj, (uint8_t *)ssid, strlen(ssid), (uint8_t *)password, strlen(password),
277275
0, 8, NULL, 0);
278276

279277
if (_wifi_status != WIFI_RADIO_ERROR_NONE) {

0 commit comments

Comments
 (0)