From ac33a3ab12bd3bfd6fd1bf642e5e73125aef6210 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 31 Mar 2021 16:09:28 +0100 Subject: [PATCH] Add exception in check when high error code == 0 Although not commonly done, it should be possible to add error codes together even if the high level error code is equal to zero. Signed-off-by: Chris Jones --- tests/src/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/helpers.c b/tests/src/helpers.c index 881967409..9c1198ea3 100644 --- a/tests/src/helpers.c +++ b/tests/src/helpers.c @@ -298,7 +298,7 @@ void mbedtls_test_err_add_check( int high, int low, * h = high level error code (includes high and module error codes). * l = low level error code. */ - if ( high > -0x1000 ) // high < 0001000000000000 + if ( high > -0x1000 && high != 0 ) // high < 0001000000000000 { mbedtls_test_fail( "'high' is not a high-level error code", line, file );