py/mpz.c: Fix bug with shl not truncating zero digits correctly.
This commit is contained in:
parent
8f6aad2f48
commit
f66ee4dfd7
2
py/mpz.c
2
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
|
|||||||
|
|
||||||
// work out length of result
|
// work out length of result
|
||||||
jlen += n_whole;
|
jlen += n_whole;
|
||||||
if (idig[jlen - 1] == 0) {
|
while (jlen != 0 && idig[jlen - 1] == 0) {
|
||||||
jlen--;
|
jlen--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user