Merge pull request #404 from farrrb/fix-nibbles-UnityPrintNumberHex

Fixed maximum number of nibbles for processor where sizeof() operator…
This commit is contained in:
Mark VanderVoord
2019-05-04 07:39:59 -04:00
committed by GitHub
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)