summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 045d659..8656c02 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12001,9 +12001,8 @@ setvar(const char *name, const char *val, int flags)
}
INTOFF;
p = mempcpy(nameeq = ckmalloc(namelen + vallen + 2), name, namelen);
- *p++ = '\0';
+ *p++ = '=';
if (vallen) {
- p[-1] = '=';
p = mempcpy(p, val, vallen);
}
*p = '\0';