vt fontcvt: Accept space after BITMAP in .bdf parser

The Unifont BDF generator incorrectly adds a space after BITMAP, and
and that error has been widely propagated.
This commit is contained in:
Ed Maste 2014-06-05 19:38:44 +00:00
parent 4f78e0cb09
commit c835c70600

View File

@ -260,7 +260,8 @@ parse_bdf(FILE *fp, unsigned int map_idx)
dwidth = atoi(ln + 7);
}
if (strcmp(ln, "BITMAP") == 0) {
if (strncmp(ln, "BITMAP", 6) == 0 &&
(ln[6] == ' ' || ln[6] == '\0')) {
for (i = 0; i < height; i++) {
if ((ln = fgetln(fp, &length)) == NULL) {
fprintf(stderr, "Unexpected EOF!\n");