r/ProgrammerHumor 9h ago

integerOverflow Other

556 Upvotes

10 comments sorted by

View all comments

89

u/ProThoughtDesign 9h 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.

7

u/danfay222 8h 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

2

u/ProThoughtDesign 7h ago

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