diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index d1fc2582d..d4e8ac808 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -301,7 +301,7 @@ uint64_t parse_binary_string(data_t *bin_string) uint64_t result = 0; TEST_LE_U(bin_string->len, 8); for (size_t i = 0; i < bin_string->len; i++) { - result |= ((bin_string->x)[i]) << (i * 8); + result = (uint64_t) result | bin_string->x[i]; } exit: return result; /* returns 0 if len > 8 */