aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2026-02-20 00:04:28 -0500
committerBruce Hill <bruce@bruce-hill.com>2026-02-20 00:04:28 -0500
commit99245c958d6077217e5e05749b0dd731b4e78d8e (patch)
treecaa056ba09f624eb8b76313b0bf09f631e5eb89c /src/stdlib
parent73a2493d15b146f0dda6dc8db3de463422464118 (diff)
Bugfix
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/paths.c2
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';