Well, now I must admit to a moronic mistake.....
After a few shots at replicating the error by modifying your .c file with my functions, I found the problem, well, at least I found the *current* problem. After my "case 255:" statement, I'd forgotten to insert a "break;" before the "default"...