Browse Source

SITL: fixed coverity 125055

mission-4.1.18
Andrew Tridgell 9 years ago
parent
commit
785ad0614a
  1. 4
      libraries/SITL/SIM_Aircraft.cpp

4
libraries/SITL/SIM_Aircraft.cpp

@ -80,18 +80,22 @@ bool Aircraft::parse_home(const char *home_str, Location &loc, float &yaw_degree @@ -80,18 +80,22 @@ bool Aircraft::parse_home(const char *home_str, Location &loc, float &yaw_degree
}
char *lat_s = strtok_r(s, ",", &saveptr);
if (!lat_s) {
free(s);
return false;
}
char *lon_s = strtok_r(NULL, ",", &saveptr);
if (!lon_s) {
free(s);
return false;
}
char *alt_s = strtok_r(NULL, ",", &saveptr);
if (!alt_s) {
free(s);
return false;
}
char *yaw_s = strtok_r(NULL, ",", &saveptr);
if (!yaw_s) {
free(s);
return false;
}

Loading…
Cancel
Save