From 09a670681774014c507f0d6bb57e698f905c78b5 Mon Sep 17 00:00:00 2001
From: Claudio Matsuoka <cmatsuoka@gmail.com>
Date: Tue, 25 Jan 2011 13:31:59 -0200
Subject: [PATCH] Don't use unitialized variable fontpath

Font path operations moved to FIGopen(), error messages changed to
use fontname.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
---
 figlet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/figlet.c b/figlet.c
index e57d851..a6836ff 100644
--- a/figlet.c
+++ b/figlet.c
@@ -1177,7 +1177,7 @@ void readfont()
   inchr theord;
   int maxlen,cmtlines,ffright2left;
   int smush,smush2;
-  char *fontpath,fileline[MAXLEN+1],magicnum[5];
+  char fileline[MAXLEN+1],magicnum[5];
   ZFILE *fontfile;
 
   fontfile = FIGopen(fontname,FONTFILESUFFIX);
@@ -1205,7 +1205,7 @@ void readfont()
     &ffright2left,&smush2);
 
   if (maxlen > MAXLEN) {
-    fprintf(stderr,"%s: %s: character is too wide\n",myname,fontpath);
+    fprintf(stderr,"%s: %s: character is too wide\n",myname,fontname);
     exit(1);
     }
 #ifdef TLF_FONTS
@@ -1214,7 +1214,7 @@ void readfont()
 #else
   if (strcmp(magicnum,FONTFILEMAGICNUMBER) || numsread<5) {
 #endif
-    fprintf(stderr,"%s: %s: Not a FIGlet 2 font file\n",myname,fontpath);
+    fprintf(stderr,"%s: %s: Not a FIGlet 2 font file\n",myname,fontname);
     exit(1);
     }
   for (i=1;i<=cmtlines;i++) {