diff --git a/src/unity.c b/src/unity.c index 0f2d2de..03dcc02 100644 --- a/src/unity.c +++ b/src/unity.c @@ -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;