Merge pull request #4554 from SparkiDev/mp_test_32bit

mp_test: when SP_INT_DIGITS is even calc was wrong
This commit is contained in:
David Garske 2021-11-10 15:07:43 -08:00 committed by GitHub
commit 607a3bfaa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36533,7 +36533,7 @@ static int mp_test_mul_sqr(mp_int* a, mp_int* b, mp_int* r1, mp_int* r2,
ret = mp_set(a, 1);
if (ret != MP_OKAY)
return -13149;
i = (SP_INT_DIGITS + 1) / 2;
i = (SP_INT_DIGITS / 2) + 1;
ret = mp_mul_2d(a, i * SP_WORD_SIZE - 1, a);
if (ret != MP_OKAY)
return -13150;