File tree 1 file changed +2
-2
lines changed
libraries/ESP8266WiFi/src
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ WiFiEventHandler ESP8266WiFiGenericClass::onStationModeConnected(std::function<v
105
105
WiFiEventHandler handler = std::make_shared<WiFiEventHandlerOpaque>(WIFI_EVENT_STAMODE_CONNECTED, [f](System_Event_t* e) {
106
106
auto & src = e->event_info .connected ;
107
107
WiFiEventStationModeConnected dst;
108
- dst.ssid = String (reinterpret_cast <char *>(src.ssid ));
108
+ dst.ssid . concat (reinterpret_cast <char *>(src.ssid ), src. ssid_len );
109
109
memcpy (dst.bssid , src.bssid , 6 );
110
110
dst.channel = src.channel ;
111
111
f (dst);
@@ -119,7 +119,7 @@ WiFiEventHandler ESP8266WiFiGenericClass::onStationModeDisconnected(std::functio
119
119
WiFiEventHandler handler = std::make_shared<WiFiEventHandlerOpaque>(WIFI_EVENT_STAMODE_DISCONNECTED, [f](System_Event_t* e){
120
120
auto & src = e->event_info .disconnected ;
121
121
WiFiEventStationModeDisconnected dst;
122
- dst.ssid = String (reinterpret_cast <char *>(src.ssid ));
122
+ dst.ssid . concat (reinterpret_cast <char *>(src.ssid ), src. ssid_len );
123
123
memcpy (dst.bssid , src.bssid , 6 );
124
124
dst.reason = static_cast <WiFiDisconnectReason>(src.reason );
125
125
f (dst);
You can’t perform that action at this time.
0 commit comments