Fix empty format string validation in bad_format_imginfo()