Fix error code combination check
`mbedtls_test_err_add_check` was previously incorrectly throwing an error if both error codes were correct and valid pure error codes. This change fixes that behaviour to correctly throw errors when invalid combinations are found. Signed-off-by: Chris Jones <christopher.jones@arm.com>
This commit is contained in:
parent
96ae73b0ea
commit
220cdece40
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ void mbedtls_param_failed( const char *failure_condition,
|
|||
void mbedtls_test_err_add_check( int high, int low,
|
||||
const char *file, int line )
|
||||
{
|
||||
if ( high < -0x0FFF && low > -0x007F )
|
||||
if ( high > -0x1000 || low < -0x007F )
|
||||
{
|
||||
mbedtls_fprintf( stderr, "\nIncorrect error code addition at %s:%d\n",
|
||||
file, line );
|
||||
|
|
Loading…
Reference in a new issue