summaryrefslogtreecommitdiffstats
path: root/bin/sh/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r--bin/sh/eval.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 415b9eb..c306e73 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -699,13 +699,13 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
for (sp = varlist.list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
- p = sp->text;
- while (*p != '=' && *p != '\0')
- out2c(*p++);
- if (*p != '\0') {
- out2c(*p++);
+ p = strchr(sp->text, '=');
+ if (p != NULL) {
+ p++;
+ outbin(sp->text, p - sp->text, out2);
out2qstr(p);
- }
+ } else
+ out2qstr(sp->text);
sep = ' ';
}
for (sp = arglist.list ; sp ; sp = sp->next) {
OpenPOWER on IntegriCloud