diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-12-07 18:11:18 -0700 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:08 +0100 |
commit | 5084f60ed55119d709cfd7f75fcc5823f58bc094 (patch) | |
tree | 5accca8352c77a852d6fec8b67fc6c3b810586e1 /src/displaywindow.c | |
parent | c85230a897b62f223951f7cc5693c6175e2d673d (diff) |
Remove use of horribly ambiguous basename() function
Diffstat (limited to 'src/displaywindow.c')
-rw-r--r-- | src/displaywindow.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c index b37a483a..04377ef5 100644 --- a/src/displaywindow.c +++ b/src/displaywindow.c @@ -1137,8 +1137,10 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks, if ( filename == NULL ) { title = strdup("No file - hdfsee"); } else { - title = malloc(strlen(basename(filename))+14); - sprintf(title, "%s - hdfsee", basename(filename)); + char *bn = safe_basename(filename); + title = malloc(strlen(bn)+14); + sprintf(title, "%s - hdfsee", bn); + free(bn); } gtk_window_set_title(GTK_WINDOW(dw->window), title); free(title); |