diff options
author | Tomasz Śniatowski <tsniatowski@opera.com> | 2015-12-03 08:01:31 (GMT) |
---|---|---|
committer | Tomasz Śniatowski <tsniatowski@opera.com> | 2015-12-03 08:05:44 (GMT) |
commit | c6bf96520bcff56d3fd67d4277c05b8db9ac2128 (patch) | |
tree | f5a73ad7274adc3e2d3f892faea475f441cea279 | |
parent | 53ca521c3de1a23d7a1f3766f011c1a21637e94e (diff) | |
download | Doxygen-c6bf96520bcff56d3fd67d4277c05b8db9ac2128.zip Doxygen-c6bf96520bcff56d3fd67d4277c05b8db9ac2128.tar.gz Doxygen-c6bf96520bcff56d3fd67d4277c05b8db9ac2128.tar.bz2 |
Fix computeCommonDirPrefix sometimes not finding the correct prefix
The code in some cases would search backwards in a string starting from
an offset beyond the string's length. Adjust so that doesn't happen and
the code doesn't mistakenly assume there is no common dir prefix.
This bug has in some scenarios led to absolute paths being used for
dir_(md5).html links, making doxygen output needlessly depend on details
of build-time paths.
-rw-r--r-- | src/dirdef.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 28c073e..10adcc9 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -836,6 +836,7 @@ static void computeCommonDirPrefix() else // dir is shorter than path -> take path of dir as new start { path=dir->name(); + l=path.length(); int i=path.findRev('/',l-2); if (i==-1) // no unique prefix -> stop { |