Merge pull request #3735 from SparkiDev/sp_int_32_bit

SP int SP_WORD_SIZE=32: cast down explicitly
This commit is contained in:
toddouska 2021-02-09 15:56:49 -08:00 committed by GitHub
commit 2f47934184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12069,7 +12069,8 @@ static int _sp_mont_red(sp_int* a, sp_int* m, sp_int_digit mp)
bits = SP_WORD_SIZE;
}
else {
sp_int_digit mask = (1UL << (bits & (SP_WORD_SIZE - 1))) - 1;
sp_int_digit mask = (sp_int_digit)
((1UL << (bits & (SP_WORD_SIZE - 1))) - 1);
sp_int_word o = 0;
for (i = 0; i < m->used; i++) {
int j;