summaryrefslogtreecommitdiffhomepage
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 70425b324..f262872ea 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -953,7 +953,8 @@ sharg(union node *arg, FILE *fp)
for (p = arg->narg.text; *p; p++) {
switch ((unsigned char)*p) {
case CTLESC:
- putc(*++p, fp);
+ p++;
+ putc(*p, fp);
break;
case CTLVAR:
putc('$', fp);
@@ -962,8 +963,10 @@ sharg(union node *arg, FILE *fp)
if (subtype == VSLENGTH)
putc('#', fp);
- while (*p != '=')
- putc(*p++, fp);
+ while (*p != '=') {
+ putc(*p, fp);
+ p++;
+ }
if (subtype & VSNUL)
putc(':', fp);