Browse Source

* Make figlet font importer more tolerant with empty lines.

pull/1/head
Sam Hocevar sam 18 years ago
parent
commit
374627e287
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/figlet.c

+ 4
- 0
src/figlet.c View File

@@ -198,6 +198,10 @@ static int open_font(context_t *cx)
if(toigets(buf, 2048, f) == NULL) if(toigets(buf, 2048, f) == NULL)
break; break;


/* Ignore blank lines, as in jacky.flf */
if(buf[0] == '\n' || buf[0] == '\r')
continue;

if(!buf[0] || buf[0] < '0' || buf[0] > '9') if(!buf[0] || buf[0] < '0' || buf[0] > '9')
{ {
free(data); free(data);


Loading…
Cancel
Save