• Tarquinn2049@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    7 days ago

    Yeah, off-by-one errors are the most common error in programming, and when you are off by +1, and then try to bring it down to 0, it rolls over to max value instead. It makes sense, since some things use 0 as 1 and some things use 1 as 1. The programmer usually just has to memorize which is which… so yeah. Not surprising that it is the most common cause of bugs.