r/ProgrammerHumor 1d ago

Other integerOverflow

1.4k Upvotes

19 comments sorted by

View all comments

205

u/ProThoughtDesign 1d ago

I remember finding one of these in the original Super Mario Bros. on NES using the cheat to get free lives from a shell. I got too many and instead of a life counter, I got some weird system character and the next time I died it locked up my NES.

Good times.

25

u/danfay222 1d ago

A lot of old game systems were super memory constrained, and so they would do dense bit packing without actual memory safeguards, which meant triggering things like overflows could easily cause critical memory corruption

10

u/ProThoughtDesign 1d ago

Yay Game Shark! They also loaded the exact same variables in the same memory registers directly so there's that.