top | item 18890097

(no title)

ryanbertrand | 7 years ago

We launched a crime based RPG game on iOS back in the day that had a leaderboard which tracked in game net worth (cash, investments, etc).

I still remember the day we woke up to multiple emails and lawsuit threats from our top player whose net worth suddenly went negative on the leaderboard.

Our players were very competitive and loved pushing the boundaries by trying to find vulnerabilities, shortcuts, etc so we assumed the worst and thought we had a bug in our system! Turned out to be our JSON parsing library was using integerValue on our NSNumber instances causing the ints to overflow. It was a tough week waiting for Apple to review the app while our players lost faith in us.

Lesson learned :)

(Luckily the player and our community was understanding and stay around)

discuss

order

teacpde|7 years ago

I like stories like this. Finding where the overflow happens could be a lot of fun. How did you figure it out? Did it take a long time?