diff --git a/owlps-positioning/src/stock.cc b/owlps-positioning/src/stock.cc index e258180..5b7d7a4 100644 --- a/owlps-positioning/src/stock.cc +++ b/owlps-positioning/src/stock.cc @@ -678,7 +678,10 @@ closest_calibration_request(const Request &request) // No non-AP reference point was found, we are forced to consider // the AP reference points if (i == calibration_requests.end()) - ignore_aps = false ; + { + i = calibration_requests.begin() ; + ignore_aps = false ; + } } float distance = i->ss_square_distance(request) ;