mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 18:52:46 +08:00
Cover last potential corner case with mixers, should be totally safe now
This commit is contained in:
@@ -142,6 +142,12 @@ NullMixer *
|
||||
NullMixer::from_text(const char *buf, unsigned &buflen)
|
||||
{
|
||||
NullMixer *nm = nullptr;
|
||||
const char *end = buf + buflen;
|
||||
|
||||
/* require a space or newline at the end of the buffer */
|
||||
if (*end != ' ' && *end != '\n' && *end != '\r') {
|
||||
return nm;
|
||||
}
|
||||
|
||||
if ((buflen >= 2) && (buf[0] == 'Z') && (buf[1] == ':')) {
|
||||
nm = new NullMixer;
|
||||
|
||||
Reference in New Issue
Block a user