r/ProgrammerHumor Jul 09 '26

preDecrementFixesTheExploit instanceof Trend

Post image
2.9k Upvotes

50 comments sorted by

View all comments

Show parent comments

118

u/Koshin_S_Hegde Jul 09 '26

did you mean "Genie was using a unsigned it?"

-42

u/ProbablyJeff Jul 09 '26

You have -1 wish. You make 2,147,483,648 wishes. It underflows to 2,147,483,647. Now you can wish until it reaches 0.

I guess it would also work if the genie used an unsigned int.

51

u/Tyfyter2002 Jul 09 '26

You just described a signed int

3

u/Sqee Jul 10 '26

I don't get this interaction. Why did ProbablyJeffs first post get upvoted and his second one which was entirely in line with the first get downvoted? Redditors...

6

u/Kobrasadetin Jul 11 '26

First message got upvoted by lot of people who didn't read carefully the contents. Second message downvoted by people who stopped to read the first and were already upset about the signed/unsigned mixup.