Use value as numerical value instead of bitfield value

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
diff --git a/library/bignum_new.c b/library/bignum_new.c
index 3f25fad..51e1416 100644
--- a/library/bignum_new.c
+++ b/library/bignum_new.c
@@ -454,10 +454,10 @@
 {
     int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
 
-    if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_LE )
+    if( m->ext_rep == MBEDTLS_MPI_MOD_EXT_REP_LE )
         ret = mbedtls_mpi_core_read_le( X, m->n, buf, buflen );
 
-    else if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_BE )
+    else if( m->ext_rep == MBEDTLS_MPI_MOD_EXT_REP_BE )
         ret = mbedtls_mpi_core_read_be( X, m->n, buf, buflen );
     else
         return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA );
@@ -481,10 +481,10 @@
                                unsigned char *buf,
                                size_t buflen )
 {
-    if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_LE )
+    if( m->ext_rep == MBEDTLS_MPI_MOD_EXT_REP_LE )
         return mbedtls_mpi_core_write_le( X, m->n, buf, buflen );
 
-    else if( m->ext_rep & MBEDTLS_MPI_MOD_EXT_REP_BE )
+    else if( m->ext_rep == MBEDTLS_MPI_MOD_EXT_REP_BE )
         return mbedtls_mpi_core_write_be( X, m->n, buf, buflen );
 
     else