lib/vsprintf.c: handle invalid format specifiers more robustly