• pinball_wizard@lemmy.zip
    link
    fedilink
    arrow-up
    29
    ·
    edit-2
    10 days ago

    Genie grants the wish, and then deducts one from the pool of remaining wishes.

    Edit 1: And it is implied that the Genie stored the number of remaining wishes as an eight bit unsigned integer, where subtracting one from zero gives 255.

    It is worth noting that unsigned integer subtract-from-zero exploits were common in video games from around the time that Disney’s Aladdin was released.

    Edit 2: No discussion of amusing subtract-from-zero bugs is complete without a link to Nuclear Gandhi. (Even though it is now believed not to have been a subtract-from-zero bug.)