Update RTWInterface.cpp

pull/4438/head
Archcady 2017-03-29 15:37:05 +08:00 committed by Martin Kojtal
parent dbcd36f242
commit 3736313c39
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ nsapi_error_t RTWInterface::scan(WiFiAccessPoint *res, unsigned count)
} }
rtw_free_sema(&scan_sema); rtw_free_sema(&scan_sema);
return ApNum; return ApNum;
}else if(count > 0 && res != NULL){ }else if(count > 0 && res != NULL){
count = count < maxApNum ? count : maxApNum; count = count < maxApNum ? count : maxApNum;
for(int i = 0; i < count; i++){ for(int i = 0; i < count; i++){
memcpy(&res[i], SCANED_AP[i], sizeof(WiFiAccessPoint)); memcpy(&res[i], SCANED_AP[i], sizeof(WiFiAccessPoint));