mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 01:53:34 +08:00
Quick hack to print floating-point numbers that are powers of 10 less wrongly.
This commit is contained in:
@@ -224,8 +224,15 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
|
||||
|
||||
for (i = expt; i > 0; i--)
|
||||
{
|
||||
obj->put(obj, *digits);
|
||||
digits++;
|
||||
if (*digits != '\0')
|
||||
{
|
||||
obj->put(obj, *digits);
|
||||
digits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj->put(obj, '0');
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the length of the fractional part */
|
||||
|
||||
Reference in New Issue
Block a user