diff options
Diffstat (limited to 'readnfnt.c')
-rw-r--r-- | readnfnt.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -436,6 +436,7 @@ void SearchNFNTResources(FILE *f,long rlistpos,int subcnt,long rdata_pos, /* The docs say that an sfnt will be found before an NFNT for a given id */ /* that appears to be a lie. An sfnt will be found for size==0, an NFNT else */ for ( mine = fonds; mine!=NULL; mine = mine->next ) { + int i; for ( i=0; i<mine->assoc_cnt; ++i ) if ( res_id==mine->assoc[i].id && mine->assoc[i].size!=0 ) { ass = &mine->assoc[i]; @@ -449,6 +450,7 @@ void SearchNFNTResources(FILE *f,long rlistpos,int subcnt,long rdata_pos, fseek(f,name_list+rname,SEEK_SET); ch1 = getc(f); fread(resname,1,ch1,f); + resname[ch1] = '\0'; sprintf( name, "%s-%d.bdf", resname, ass!=NULL?ass->size:font.fRectHeight ); } else if ( ass!=NULL ) { if ( mine->fondname==NULL ) |