diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -728,9 +728,9 @@ base_name(const char *in_file) if (file == NULL) fatalerr("strdup() failure in %s()\n", __func__); - for (p = file + strlen(file); p > file && *p != '.'; p--); + p = strrchr(file, '.'); - if (*p == '.') + if (p != NULL) *p = '\0'; return (file); } |