diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-30 20:44:53 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-30 20:44:53 +0000 |
commit | 2377e93898d784803421ae0f2fbf2b5dcf469b2a (patch) | |
tree | f54cf9719d525e947513991fea0edddf2fa581fb /amiga/font_scan.c | |
parent | 7a72ff3161c8cfe31cf3217304223593a277a647 (diff) | |
download | netsurf-2377e93898d784803421ae0f2fbf2b5dcf469b2a.tar.gz netsurf-2377e93898d784803421ae0f2fbf2b5dcf469b2a.tar.bz2 |
fix a crash in the font scanner
Diffstat (limited to 'amiga/font_scan.c')
-rw-r--r-- | amiga/font_scan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/amiga/font_scan.c b/amiga/font_scan.c index 393be8517..fa2799ae0 100644 --- a/amiga/font_scan.c +++ b/amiga/font_scan.c @@ -331,7 +331,7 @@ static ULONG ami_font_scan_list(struct MinList *list) if(af[i].af_Attr.ta_Style == FS_NORMAL) { if(af[i].af_Attr.ta_Name != NULL) { char *p = 0; - if(p = strrchr(af[i].af_Attr.ta_Name, '.')) *p = '\0'; + if((p = strrchr(af[i].af_Attr.ta_Name, '.'))) *p = '\0'; node = (struct nsObject *)FindIName((struct List *)list, af[i].af_Attr.ta_Name); if(node == NULL) { @@ -466,7 +466,7 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, ULONG i, found = 0, entries = 0; struct MinList *list; struct nsObject *node; - char *unicode_font, *csv; + char *csv; struct ami_font_scan_window *win = NULL; /* Ensure array zeroed */ @@ -488,7 +488,7 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, while((p = strsep(&csv, ","))) { if(p != NULL) { node = AddObject(list, AMINS_UNKNOWN); - if(node) node->dtz_Node.ln_Name = p; + if(node) node->dtz_Node.ln_Name = strdup(p); entries++; } } |