From 8de331def08568678fa09536b5589ea473bee6e6 Mon Sep 17 00:00:00 2001 From: Paul Fox Date: Thu, 21 Jul 2005 12:03:05 +0000 Subject: [PATCH] revert 10881, and refix by changing "if (vallen)" to "if (val)". this is per the upstream fix for dash, in dash_0.5.2-6.diff. thanks vodz, for catching this. --- shell/ash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/ash.c b/shell/ash.c index 8656c0219..783204933 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -12001,8 +12001,9 @@ setvar(const char *name, const char *val, int flags) } INTOFF; p = mempcpy(nameeq = ckmalloc(namelen + vallen + 2), name, namelen); - *p++ = '='; - if (vallen) { + *p++ = '\0'; + if (val) { + p[-1] = '='; p = mempcpy(p, val, vallen); } *p = '\0'; -- 2.25.1