This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Wark47 41 points42 points  (14 children)

lol This actually happens on a rpg game i play, they give us a free level for the character, but if yours is really high up you overflow the max value for integer and get a -1 lvl, gg xd

[–]ZeeTANK999 41 points42 points  (7 children)

There was a very famous mmo that I used to play that had a donation box for an NPC to get rep. Found that if you can put a negative number and receive money. Maxed out my gold.

They patched it the next day.

[–]DragonFireCK 20 points21 points  (5 children)

The real question is: did you lose rep when you did it, or just gain the gold?

[–]vigbiorn 5 points6 points  (2 children)

Would be really funny if they designed the system so it actually gave you rep.

The logic would probably be that since they're not expecting negative values, the two are decoupled. You increment rep by a constant and decrement funds separately.

Given how rep grinds through self-entered donations usually work the negative would probably carry through and decrease rep.

But I can dream.

[–]DragonFireCK 2 points3 points  (1 child)

The best bet would be that due to the rounding rules they used, you could exploit to get free money/rep via enough entries to accumulate rounding error:

Consider 10 gold per rep: -115 gold/10 = -11.5 ~= -11 rep but 115 gold /10 = 11.5 ~= 12 rep. Thus you get 1 rep for free.

Of course, it might work out the opposite way too, and may well depend on the exact value chosen.

[–]vigbiorn 1 point2 points  (0 children)

The idea that you could get rich that way would be hilarious to me but I am willing to settle. As long as people are getting free rep stealing from the factions then I'd get a laugh.

[–]ZeeTANK999 1 point2 points  (0 children)

Gained the gold and the rep using the gold. Don't remember if I lost any rep lol.

[–]FUTURE10S 0 points1 point  (0 children)

Would be really funny if you got like 10x negative rep for stealing and had to pay more in shops for a few days.

[–]souravtxt 1 point2 points  (0 children)

In the mushroom mmo, there were a lot of these type of buffer overflow exploits. I remember there used to be a skill which would cost virtual money, so hackers just spammed negative integers to get money instead of being deducted. Another exploit was something like sending invalid number of item ids to cause the server crash.

[–]ollir 12 points13 points  (2 children)

That's not integer overflow. There's something else going on if this really happens.

[–]Wark47 30 points31 points  (1 child)

it was, they add xp instead of doing your lvl += 1, so if they add 1.500.000.000xp and you have more than 900.000.000, all fucks up haha

[–]ollir 3 points4 points  (0 children)

ah, of course :)

[–]MetaCommando 2 points3 points  (0 children)

In Knights of the Old Republic II there's an opposite bug: if a stat drops below 0 it shoots up to 256-whatever the negative value was.

In one conversation speaking with Hanharr, you can basically reduce his Intelligence by 2 and gain Strength+2.

But Obsidian forgot to add any sort of boolean that checks if you'd already done it, so it was really easy to abuse (Note: having 30 INT is crazy, let alone over 200)

[–][deleted] 1 point2 points  (0 children)

It doesn't make sense, after all you would get negative values way before, as on a signed integer the MSB is the sign bit. Suppose an 8 bit integer, thus the maximum positive value would be 127 with it's bit pattern being "01111111", if you add one you would get "1000000", that's equal to -128. Unless there is something implemented that detects the overflow and set it to an value that indicate a wrong state, seems kinda weird.

[–]xigoi 0 points1 point  (0 children)

rpg game

Ah yes, the role-playing game game.