mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-28 18:54:27 +01:00
Fix another signed integer overflow.
This commit is contained in:
@@ -1019,22 +1019,22 @@ void UnityAssertNumbersWithin(const UNITY_UINT delta,
|
|||||||
{
|
{
|
||||||
if (actual > expected)
|
if (actual > expected)
|
||||||
{
|
{
|
||||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta);
|
Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta);
|
Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((UNITY_UINT)actual > (UNITY_UINT)expected)
|
if ((UNITY_UINT)actual > (UNITY_UINT)expected)
|
||||||
{
|
{
|
||||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta);
|
Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta);
|
Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user