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:
Lorenz Meier 2014-08-19 15:40:52 +02:00
commit 6e8867928b
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}