Then I wish for two more wishes.
Then I wish that wishes are an absolute value.
Then I wish for a million fewer wishes.
Then I wish for 65,536 wishes. The genie crashes with an integer overflow error.
There's no crash, you just go back to 0. Goodbye.
If num_wishes is a signed int, wouldn't it overflow back to -65536? I suddenly owe the genie a bunch of wishes?
num_wishes
All I have to offer is half a bowl of instant noodles, a lawnmower full of grass and toe nail clippings. So Genie, what do you wish for?
Nah, it doesn't crash, now you just have to perform 65,535 wishes for the genie.
Humor, jokes, memes about TTRPGs
Then I wish for two more wishes.
Then I wish that wishes are an absolute value.
Then I wish for a million fewer wishes.
Then I wish for 65,536 wishes. The genie crashes with an integer overflow error.
There's no crash, you just go back to 0. Goodbye.
If
num_wishesis a signed int, wouldn't it overflow back to -65536? I suddenly owe the genie a bunch of wishes?All I have to offer is half a bowl of instant noodles, a lawnmower full of grass and toe nail clippings. So Genie, what do you wish for?
Nah, it doesn't crash, now you just have to perform 65,535 wishes for the genie.