Overflowing World of Warcraft's gold counter


Bank Overflow

It's a little known fact, but my only vice... Well, one of my few vices... Cough. Amongst my vices is the fact that I play World of Wacraft with a small group of real-life friends. As WoW habits go, mine is a very mild one - I don't often have time to play more than one night a week. On the one night I do have, I want to raid, not grind for gold to service endless repair bills. Irked by my situation, I did what any red-blooded programmer would do. I wrote some code to collect information on auction house price movements, analysed my data, and implemented a Secret Trading Strategy in the form of a Super Secret Addon (which operates, of course, entirely within WoW's terms of service). This has been successful beyond the wildest dreams of avarice - I spend about 5 minutes a day buying and selling the auctions recommended by the SSA, and I make enough to bankroll my entire guild.

In fact, I just noticed that I have managed to overflow the "Total gold acquired" counter in my stats tab. Turns out that WoW stores this figure as a 32-bit signed integer, expressed in copper. WoW now thinks I've earned -1981224360 copper in total, something that can be achieved by earing more than 230 000 gold.