Adjust how decimal tracking handles to avoid warnings.

This commit is contained in:
Mark VanderVoord
2021-06-03 08:51:24 -04:00
parent b63524d0fd
commit e44c3b56f7
3 changed files with 3 additions and 3 deletions

View File

@@ -445,7 +445,7 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number)
/* build up buffer in reverse order */
digits = 0;
while ((n != 0) || (digits < (decimals + 1)))
while ((n != 0) || (digits <= decimals))
{
buf[digits++] = (char)('0' + n % 10);
n /= 10;