Skip to content
Snippets Groups Projects
  • Arne Goedeke's avatar
    f1989d3a
    enumerate(): fixed integer overflow handling · f1989d3a
    Arne Goedeke authored
    This change fixes two bugs
    1) the overflow checks were incorrect, because signed integers do not
       overflow
    2) when overflow was actually detected, the code fell back to the
       slow path (using f_add) with the last array element as the new start
       value, which led to wrong results
    f1989d3a
    History
    enumerate(): fixed integer overflow handling
    Arne Goedeke authored
    This change fixes two bugs
    1) the overflow checks were incorrect, because signed integers do not
       overflow
    2) when overflow was actually detected, the code fell back to the
       slow path (using f_add) with the last array element as the new start
       value, which led to wrong results
builtin_functions.c 269.49 KiB