mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 23:43:33 +08:00
Fixed undefined behavior
This commit is contained in:
@@ -85,11 +85,15 @@ public:
|
||||
{
|
||||
while (s && *s)
|
||||
{
|
||||
if (*s == '%' && *++s != '%')
|
||||
if (*s == '%')
|
||||
{
|
||||
writeValue(value);
|
||||
write(++s, args...);
|
||||
break;
|
||||
s += 1;
|
||||
if (*s != '%')
|
||||
{
|
||||
writeValue(value);
|
||||
write(++s, args...);
|
||||
break;
|
||||
}
|
||||
}
|
||||
writeValue(*s++);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user