Another dtoa() fix from Mike Smith

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5229 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-10-11 13:42:14 +00:00
parent ca71c149e2
commit e62b420882
9 changed files with 121 additions and 94 deletions
+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 */