We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f6aad2 commit f66ee4dCopy full SHA for f66ee4d
1 file changed
py/mpz.c
@@ -97,7 +97,7 @@ STATIC mp_uint_t mpn_shl(mpz_dig_t *idig, mpz_dig_t *jdig, mp_uint_t jlen, mp_ui
97
98
// work out length of result
99
jlen += n_whole;
100
- if (idig[jlen - 1] == 0) {
+ while (jlen != 0 && idig[jlen - 1] == 0) {
101
jlen--;
102
}
103
0 commit comments