Attached are my first[1] attempts at changing OTTD code. I hope they are in the right format, but feel free to apply a clue-by-four if they're not. I may be an experienced TTDPatch developer, but I'm still a newbie at OTTD coding

The first patch fixes a bug Rubidium has accidentally introduced with the new flexible animation array, and could cause memory overwrite when loading an old save game.
The second tries to revert the logic of the animation handler to the original TTD logic. The memmove may seem to be an overkill, and the original logic more convoluted, but this is to ensure that all tiles are always animated, and the animation order stays consistent. I hope the comments explain what the change does exactly.
[1] OK, actually second because I've started the smooth production changes patch, too, but that was long ago.
[Edit] fixed the first patch, there was a return statement missing