[rtems-graphics-toolkit commit] Corrected some bugs in t1lib font adding

Gedare Bloom gedare at rtems.org
Tue Dec 24 15:24:16 UTC 2013


Module:    rtems-graphics-toolkit
Branch:    master
Commit:    4d56a50803b5778884b2f7bd7bf9dc2dd4f09598
Changeset: http://git.rtems.org/rtems-graphics-toolkit/commit/?id=4d56a50803b5778884b2f7bd7bf9dc2dd4f09598

Author:    Alexandru-Sever Horin <alex.sever.h at gmail.com>
Date:      Mon Aug 20 01:35:52 2012 +0300

Corrected some bugs in t1lib font adding

---

 t1lib-5.1.2/lib/t1lib/t1env.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/t1lib-5.1.2/lib/t1lib/t1env.c b/t1lib-5.1.2/lib/t1lib/t1env.c
index 6a68c0a..06de656 100644
--- a/t1lib-5.1.2/lib/t1lib/t1env.c
+++ b/t1lib-5.1.2/lib/t1lib/t1env.c
@@ -846,6 +846,8 @@ int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname)
       T1_errno=T1ERR_ALLOC_MEM;
       return(-1);
     }
+    strcpy(newpath, pathname);
+
     /* Check for and handle the existing path configuration */
     if (pfab_no==0) {   /* do not free the default path but establish it
 			   as a regularly setup path, if database not empty! */
@@ -853,7 +855,7 @@ int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname)
 	pfab_no++;
       }
       else {
-	free( T1_AFM_ptr[0]);
+	free( T1_PFAB_ptr[0]);
       }
     }
     if (pfab_no==-1) {  /* not initialized! */
@@ -884,6 +886,8 @@ int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname)
       T1_errno=T1ERR_ALLOC_MEM;
       return(-1);
     }
+    strcpy(newpath, pathname);
+
     /* Check for and handle the existing path configuration */
     if (afm_no==0) {   /* do not free the default path but establish it
 			  as a regularly setup path, if database not empty! */
@@ -922,6 +926,8 @@ int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname)
       T1_errno=T1ERR_ALLOC_MEM;
       return(-1);
     }
+    strcpy(newpath, pathname);
+
     /* Check for and handle the existing path configuration */
     if (enc_no==0) {    /* do not free the default path but establish it
 			   as a regularly setup path, if database not empty! */




More information about the vc mailing list