diff options
Diffstat (limited to 'lib/cleanpath.c')
-rw-r--r-- | lib/cleanpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cleanpath.c b/lib/cleanpath.c index f94c66d..c7f8bc9 100644 --- a/lib/cleanpath.c +++ b/lib/cleanpath.c @@ -102,7 +102,7 @@ char *cleanpath_read(struct CleanPath *path) { strcat(result, path->part[i]); // Do not append path separator on final element - if (path->part[i + 1] != NULL) { + if (path->part[i + 1] != NULL && *path->part[i + 1] != '\0') { strcat(result, path->sep); } } |