Quick hack to print floating-point numbers that are powers of 10 less wrongly.

This commit is contained in:
px4dev
2012-10-11 00:22:22 -07:00
parent ec018e7b64
commit 674b655236
+9 -2
View File
@@ -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 */