1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-25 01:11:36 +01:00

Fixed maximum number of nibbles for processor where sizeof() operator doesn't return the size of a type in 8-bit bytes (e.g. the TI C2000 series).

This commit is contained in:
Fabian Zahn
2019-04-07 11:56:34 +02:00
parent 8507757c6a
commit 52ff8613a2
2 changed files with 6 additions and 4 deletions

View File

@@ -352,9 +352,9 @@ void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
int nibble;
char nibbles = nibbles_to_print;
if ((unsigned)nibbles > (2 * sizeof(number)))
if ((unsigned)nibbles > UNITY_MAX_NIBBLES)
{
nibbles = 2 * sizeof(number);
nibbles = UNITY_MAX_NIBBLES;
}
while (nibbles > 0)