Case 24 falls through to case 32, which overwrites all of case 24's work. Looks wrong. Git blames commit 0da2ea1b "fix endianness problem sharing the videoram buffer".
Patching in a break is easy enough, but since I don't actually understand how the function is used, I have no idea what exactly this fixes. Stefano, can you help?