summaryrefslogtreecommitdiff
path: root/soltools/mkdepend/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'soltools/mkdepend/main.c')
-rw-r--r--soltools/mkdepend/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 411dfc0040b8..04fefbb354bc 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -623,6 +623,14 @@ char *base_name(file)
if (*p == '.')
*p = '\0';
+
+ while (p > file) {
+ if ( *p == '/' || *p == '\\') {
+ file = p + 1;
+ break;
+ };
+ p--;
+ };
return(file);
}