mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-07-17 15:39:05 +08:00
Fixed printability of largest negative value (Thanks SigmaPic!)
This commit is contained in:
12
src/unity.c
12
src/unity.c
@ -125,12 +125,18 @@ void UnityPrintNumber(const _U_SINT number_to_print)
|
||||
{
|
||||
_U_SINT divisor = 1;
|
||||
_U_SINT next_divisor;
|
||||
_U_SINT number = number_to_print;
|
||||
|
||||
if (number < 0)
|
||||
_U_UINT number;
|
||||
|
||||
if (number_to_print < 0)
|
||||
{
|
||||
UNITY_OUTPUT_CHAR('-');
|
||||
number = -number;
|
||||
number = -number_to_print;
|
||||
}
|
||||
else
|
||||
{
|
||||
number = number_to_print;
|
||||
|
||||
}
|
||||
|
||||
// figure out initial divisor
|
||||
|
Reference in New Issue
Block a user