sscanf field widths seem to be broken, don't use them.

This commit is contained in:
px4dev 2012-08-20 17:59:12 -07:00
parent 821306bc4d
commit 3246568c82
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ mixer_load_multirotor(Mixer::ControlCallback control_cb, uintptr_t cb_handle, co
char geomname[8]; char geomname[8];
int s[4]; int s[4];
if (sscanf(buf, "R: %7s %d %d %d %d", geomname, &s[0], &s[1], &s[2], &s[3]) != 5) { if (sscanf(buf, "R: %s %d %d %d %d", geomname, &s[0], &s[1], &s[2], &s[3]) != 5) {
debug("multirotor parse failed on '%s'", buf); debug("multirotor parse failed on '%s'", buf);
return nullptr; return nullptr;
} }