py/mpz.c: Fix bug with shl not truncating zero digits correctly.

This commit is contained in:
Damien George 2015-04-22 23:16:49 +01:00
parent 8f6aad2f48
commit f66ee4dfd7
1 changed files with 1 additions and 1 deletions

View File

@ -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
jlen += n_whole;
if (idig[jlen - 1] == 0) {
while (jlen != 0 && idig[jlen - 1] == 0) {
jlen--;
}