Skip to content
  • Damien George's avatar
    py/mpz: Fix bug with overflowing C-shift in division routine. · dc3faea0
    Damien George authored
    When DIG_SIZE=32, a uint32_t is used to store limbs, and no normalisation
    is needed because the MSB is already set, then there will be left and
    right shifts (in C) by 32 of a 32-bit variable, leading to undefined
    behaviour.  This patch fixes this bug.
    dc3faea0