diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-22 23:16:49 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-22 23:16:49 +0100 |
commit | f66ee4dfd70608461cd35c2d91d217337193f547 (patch) | |
tree | 4964b970112a3263e788481bba351cd49d95cd76 /py | |
parent | 8f6aad2f4896beb06c5cbb8f983d7c183dd10788 (diff) |
py/mpz.c: Fix bug with shl not truncating zero digits correctly.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpz.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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--; } |