diff options
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -126,12 +126,12 @@ init_funcname_len(const char **file) /* Load the file as an object one */ for (base = p; *p; p++) { /* Find position of last '/' */ - if (*p == '.') dot = p; - if (isdirsep(*p)) base = p+1; + if (*p == '.' && !dot) dot = p; + if (isdirsep(*p)) base = p+1, dot = NULL; } *file = base; /* Delete suffix if it exists */ - return (dot && dot > base ? dot : p) - base; + return (dot ? dot : p) - base; } static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX; |