aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 22e6d35ae10..b838d90b636 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4714,9 +4714,10 @@ relative_filename (file, dir)
4714 while (*fp++ == *dp++) 4714 while (*fp++ == *dp++)
4715 continue; 4715 continue;
4716 fp--, dp--; /* back to the first differing char */ 4716 fp--, dp--; /* back to the first differing char */
4717 do /* look at the equal chars until '/' */ 4717 do { /* look at the equal chars until '/' */
4718 if (fp == abs) return abs; /* first char differs, give up */
4718 fp--, dp--; 4719 fp--, dp--;
4719 while (*fp != '/'); 4720 } while (*fp != '/');
4720 4721
4721 /* Build a sequence of "../" strings for the resulting relative file name. */ 4722 /* Build a sequence of "../" strings for the resulting relative file name. */
4722 i = 0; 4723 i = 0;