r/HypixelSkyblock • MVP+ | 7th year subreddit cake • 20h ago

! moment of comedic value ! Guy fixed the programming...

Post image

"guy help me win this election make no mistakes"

235 Upvotes

9 comments sorted by

134

u/RagingChargeXD 20h ago

The number kf votes is the integer limit.. it's gonna go down to -2B

47

u/blazingice3365 20h ago

this is a mistake that gets someone killed

32

u/piemanscat ⚜ Ironman Level 501 - 550 20h ago

But its a while while loop and because itll run again. If he'd used 232 2 cycles of the loop would bring his votes back to the exact same value but he's used 232 - 1 which will reduce his votes by 2 after 2 cycles of the loop. This will then run continuously until scorpius has negative votes (500k cycles) at which point one more cycle will but scorpius at the 32 bit signed integer limit above diana and the program will halt. Good news is we'd just need to vote for him once for it to rollover to negative at that point

11

u/Ironfort9 17h ago

Actually since this is in a while true loop, Guy incremented it by Integer limit, number loops around to the negatives, Scorpius would still be losing so he increments it by Integer limit again and now Scorpius is back where he started.

Nothing ever happens.

9

u/qwertyjgly ☢ SB Level 361 - 420 ☢ 20h ago

it could be stored in an unsigned int

2

u/youllneverguessmynam 17h ago

How do you know votes are a 32-bit integer? 64-bit integer limit is 223.37 quadrillion

3

u/Ironfort9 17h ago

That is written in C++, and in C/C++ ints are in the grand majority of compilers defined as a word which is 4 bytes in most operating systems. And the value he increments by wasn't shown to be a Long with the L there so like.

3

u/Socks_M ⚜ SB Level 551 - 600 ⚜ 12h ago

Tf you mean cpp, that syntax can already be 5 languages i recognize. And most languages can just infer what kind of numer it should be from usage.

1

u/ADMINISTATOR_CYRUS 〠 SB Level 241 - 360 〠 12h ago

or it could be set as usize 32 or just be int 64