mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-26 11:50:43 +08:00
Put back (char) casts, better formatting
This commit is contained in:
@ -190,7 +190,8 @@ void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
|
|||||||
{
|
{
|
||||||
int nibble;
|
int nibble;
|
||||||
char nibbles = nibbles_to_print;
|
char nibbles = nibbles_to_print;
|
||||||
if ((unsigned)nibbles > 2 * sizeof number) nibbles = 2 * sizeof number;
|
if ((unsigned)nibbles > (2 * sizeof(number)))
|
||||||
|
nibbles = 2 * sizeof(number);
|
||||||
|
|
||||||
while (nibbles > 0)
|
while (nibbles > 0)
|
||||||
{
|
{
|
||||||
@ -198,11 +199,11 @@ void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
|
|||||||
nibble = (number >> (nibbles * 4)) & 0x0F;
|
nibble = (number >> (nibbles * 4)) & 0x0F;
|
||||||
if (nibble <= 9)
|
if (nibble <= 9)
|
||||||
{
|
{
|
||||||
UNITY_OUTPUT_CHAR('0' + nibble);
|
UNITY_OUTPUT_CHAR((char)('0' + nibble));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UNITY_OUTPUT_CHAR('A' - 10 + nibble);
|
UNITY_OUTPUT_CHAR((char)('A' - 10 + nibble));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user