From 374627e287766da10b9e2ed57cb820d714d0a572 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 6 Nov 2006 17:33:31 +0000 Subject: [PATCH] * Make figlet font importer more tolerant with empty lines. --- src/figlet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/figlet.c b/src/figlet.c index 80302d9..eb3a075 100644 --- a/src/figlet.c +++ b/src/figlet.c @@ -198,6 +198,10 @@ static int open_font(context_t *cx) if(toigets(buf, 2048, f) == NULL) 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') { free(data);