Wait - does prterror cause the program to exit? It's not defined, so maybe the program does terminate, maybe it doesn't.
Edit: I guess it may not technically be a bug as it's just a small function, but using a single % instead of %% (which is what printf expects) would be a format error, hence prterror()
In your example, "%" would cause switch ('\0') which would fall in the default case.
The function should probably return on error.