diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-10-10 18:08:36 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-10-10 18:08:36 +0000 |
commit | e9f98a16d7b46332ec4986d890c5d2e26f081cc7 (patch) | |
tree | bf0876eee432feca7226a96ffe9e4db14c6cfa00 | |
parent | f5e75663fef044cad02eef3eb7aef295312c1158 (diff) | |
download | skalibs-e9f98a16d7b46332ec4986d890c5d2e26f081cc7.tar.xz |
Fix path_canonicalize()'s returned length when absolute
-rw-r--r-- | src/libstddjb/path_canonicalize.c | 2 |
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 ; } |