diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 81d595d29e..9d3d5f53f7 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -350,7 +350,7 @@ void AdminModule::handleGetModuleConfigResponse(const meshtastic_MeshPacket &mp, if (devicestate.node_remote_hardware_pins[i].node_num == 0 || !devicestate.node_remote_hardware_pins[i].has_pin) { continue; } - for (uint8_t j = 0; j < sizeof(r->get_module_config_response.payload_variant.remote_hardware.available_pins); j++) { + for (uint8_t j = 0; j < r->get_module_config_response.payload_variant.remote_hardware.available_pins_count; j++) { auto availablePin = r->get_module_config_response.payload_variant.remote_hardware.available_pins[j]; if (i < devicestate.node_remote_hardware_pins_count) { devicestate.node_remote_hardware_pins[i].node_num = mp.from;