Sure, that handles it at the beginning. Not at the end.while(!is_roman(rdigit) && !IS_WHITE_SPACE(rdigit) && rdigit != EOF) return 0;
Just walk through it yourself with a debugger. Watch what happens when you enter an invalid roman numeral after some valid ones.
Also, if you come back to the problem with a fresh set of eyes after a bit of a drink and rest, sometimes it helps.