Here's a similar exploit for Gold/Silver: http://forums.glitchcity.info/index.php/topic,6716.0.html
edit; If you are interested in finding other glitches, there's commented source code over here:
Red/Blue: https://github.com/iimarckus/pokered
Crystal: https://github.com/kanzure/pokecrystal (Gold/Silver doesn't compile yet)