File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed 
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 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
105105    WiFiEventHandler handler = std::make_shared<WiFiEventHandlerOpaque>(WIFI_EVENT_STAMODE_CONNECTED, [f](System_Event_t* e) {
106106        auto & src = e->event_info .connected ;
107107        WiFiEventStationModeConnected dst;
108-         dst.ssid  =  String (reinterpret_cast <char *>(src.ssid ));
108+         dst.ssid . concat (reinterpret_cast <char *>(src.ssid ), src. ssid_len );
109109        memcpy (dst.bssid , src.bssid , 6 );
110110        dst.channel  = src.channel ;
111111        f (dst);
@@ -119,7 +119,7 @@ WiFiEventHandler ESP8266WiFiGenericClass::onStationModeDisconnected(std::functio
119119    WiFiEventHandler handler = std::make_shared<WiFiEventHandlerOpaque>(WIFI_EVENT_STAMODE_DISCONNECTED, [f](System_Event_t* e){
120120        auto & src = e->event_info .disconnected ;
121121        WiFiEventStationModeDisconnected dst;
122-         dst.ssid  =  String (reinterpret_cast <char *>(src.ssid ));
122+         dst.ssid . concat (reinterpret_cast <char *>(src.ssid ), src. ssid_len );
123123        memcpy (dst.bssid , src.bssid , 6 );
124124        dst.reason  = static_cast <WiFiDisconnectReason>(src.reason );
125125        f (dst);
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments