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;

View File

@@ -10,7 +10,7 @@
#define UNITY_VERSION_MAJOR 2
#define UNITY_VERSION_MINOR 5
#define UNITY_VERSION_BUILD 2
#define UNITY_VERSION_BUILD 3
#define UNITY_VERSION ((UNITY_VERSION_MAJOR << 16) | (UNITY_VERSION_MINOR << 8) | UNITY_VERSION_BUILD)
#ifdef __cplusplus