summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-10-10 18:08:36 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-10-10 18:08:36 +0000
commite9f98a16d7b46332ec4986d890c5d2e26f081cc7 (patch)
treebf0876eee432feca7226a96ffe9e4db14c6cfa00 /src/libstddjb
parentf5e75663fef044cad02eef3eb7aef295312c1158 (diff)
downloadskalibs-e9f98a16d7b46332ec4986d890c5d2e26f081cc7.tar.xz
Fix path_canonicalize()'s returned length when absolute
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/path_canonicalize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/path_canonicalize.c b/src/libstddjb/path_canonicalize.c
index c30f9f4..8dec829 100644
--- a/src/libstddjb/path_canonicalize.c
+++ b/src/libstddjb/path_canonicalize.c
@@ -65,5 +65,5 @@ size_t path_canonicalize (char *out, char const *in, int check)
if (j && out[j-1] == '/') j-- ;
if (!j && !isabsolute) out[j++] = '.' ;
out[j] = 0 ;
- return j ;
+ return j + isabsolute ;
}