Fix unsigned integer underflow in UnityAssertEqualIntArray

This commit is contained in:
Shreyas Balakrishna
2017-11-23 14:58:45 +13:00
parent 2c7629a0ae
commit 4325773e76

@ -556,7 +556,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;