From c6bf96520bcff56d3fd67d4277c05b8db9ac2128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=9Aniatowski?= Date: Thu, 3 Dec 2015 09:01:31 +0100 Subject: 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. --- src/dirdef.cpp | 1 + 1 file changed, 1 insertion(+) 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 { -- cgit v0.12