mirror of https://github.com/ArduPilot/ardupilot
AP_HAL: fixed vprintf segfault
This commit is contained in:
parent
fa2a39f6c6
commit
c90d7dd86e
|
@ -364,10 +364,14 @@ flt_oper:
|
|||
pnt = (char *)buf;
|
||||
size = 1;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
pnt = va_arg (ap, char *);
|
||||
size = strnlen (pnt, (flags & FL_PREC) ? prec : ~0);
|
||||
break;
|
||||
|
||||
default:
|
||||
goto non_string;
|
||||
}
|
||||
|
||||
if (!(flags & FL_LPAD)) {
|
||||
|
@ -385,6 +389,8 @@ flt_oper:
|
|||
goto tail;
|
||||
}
|
||||
|
||||
non_string:
|
||||
|
||||
/*
|
||||
* Handle integer formats variations for d/i, u, o, p, x, X.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue