diff options
Diffstat (limited to 'src/stdlib')
| -rw-r--r-- | src/stdlib/paths.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index cbd5e657..9d1fad9c 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -62,7 +62,7 @@ static void normalize_inplace(char path[PATH_MAX]) { *dest = '\0'; } else { // Otherwise copy over the component and any trailing slash or NUL - *(dest++) = '/'; + if (src > path || path[0] == '/') *(dest++) = '/'; memcpy(dest, src, component_len); dest += component_len; *dest = '\0'; |
