Hello,
I made an account specifically to thank you for making this piece of code. It saved my copy of Pokemon Y, which was so badly messed up it wouldn't even let me get past the intro screen. Now it seems to work just fine.
I purchased the game on ebay because I wanted to own a legit copy. The previous owner had hacked in a bunch of totally illegit pokemon, to the point where virtually nothing was worth saving. So I deleted the save and tried to start a new one, and that's when my problems started. It would let me pick my language, and then it would crash out with an error screen.
So again, thanks for saving my game. Now I can play the game I missed out on when I was younger.
~BR44