summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--src/libstddjb/env_merge.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index fb917b0..f4d9276 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -33,3 +33,4 @@ Thanks to:
Éric Le Bihan <eric.le.bihan.dev@free.fr>
Samuel Holland <samuel@sholland.org>
Jan Bramkamp <crest_maintainer@rlwinm.de>
+ Johannes Nixdorf <mixi@shadowice.org>
diff --git a/src/libstddjb/env_merge.c b/src/libstddjb/env_merge.c
index f7ba335..9129cf3 100644
--- a/src/libstddjb/env_merge.c
+++ b/src/libstddjb/env_merge.c
@@ -16,8 +16,7 @@ size_t env_merge (char const **v, size_t vmax, char const *const *envp, size_t e
{
size_t split = str_chr(modifs + i, '=') ;
size_t j = 0 ;
- for (; j < vlen ; j++)
- if (!memcmp(modifs + i, v[j], split) && (v[j][split] == '=')) break ;
+ for (; j < vlen ; j++) if (!strncmp(modifs + i, v[j], split+1)) break ;
if (j < vlen) v[j] = v[--vlen] ;
if (modifs[i + split]) v[vlen++] = modifs + i ;
}