Merge pull request #312 from shreyasbharath/master_fix_integer_underflow

Fix unsigned integer underflow in UnityAssertEqualIntArray (Thanks @shreyasbharath )
This commit is contained in:
Mark VanderVoord
2017-11-27 06:50:49 -05:00
committed by GitHub

View File

@ -620,7 +620,7 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
UNITY_FAIL_AND_BAIL;
while (elements--)
while ((elements > 0) && elements--)
{
UNITY_INT expect_val;
UNITY_INT actual_val;