diff --git a/targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.cpp b/targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.cpp index 38b45a8234..273e3d1a69 100644 --- a/targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.cpp +++ b/targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.cpp @@ -73,7 +73,7 @@ static rtw_result_t scan_result_handler( rtw_scan_handler_result_t* malloced_sca } ap.rssi = record->signal_strength; ap.channel = record->channel; - new (&scan_handler->ap_details[scan_handler->ap_num]) WiFiAccessPoint(ap); + scan_handler->ap_details[scan_handler->ap_num] = WiFiAccessPoint(ap); } scan_handler->ap_num++; } else{