use unary minus on the incoming int instead of the casted uint

This commit is contained in:
Alexander Brevig
2019-03-12 00:17:37 +01:00
parent a78c799701
commit 0dafa0b306

View File

@ -321,7 +321,7 @@ void UnityPrintNumber(const UNITY_INT number_to_print)
{ {
/* A negative number, including MIN negative */ /* A negative number, including MIN negative */
UNITY_OUTPUT_CHAR('-'); UNITY_OUTPUT_CHAR('-');
number = -number; number = (UNITY_UINT)-number_to_print;
} }
UnityPrintNumberUnsigned(number); UnityPrintNumberUnsigned(number);
} }