Fix strict-overflow compiler warning
By replacing "x < y + 1" with "x <= y" the compiler doesn't have to do
it and the warning "assuming signed overflow does not occur when
reducing constant in comparison [-Werror=strict-overflow]" is avoided.
@@ -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;
