forked from Archive/PX4-Autopilot
Merge pull request #1290 from PX4/sf_fix
Require a digit ahead of the dot for a valid number for the SF0x output
This commit is contained in:
commit
6e8867928b
|
@ -598,7 +598,8 @@ SF0X::collect()
|
|||
memcpy(_linebuf, buf, (lend + 1) - (i + 1));
|
||||
}
|
||||
|
||||
if (_linebuf[i] == '.') {
|
||||
/* we need a digit before the dot and a dot for a valid number */
|
||||
if (i > 0 && _linebuf[i] == '.') {
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue