diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 9 |
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) | |||
953 | for (p = arg->narg.text; *p; p++) { | 953 | for (p = arg->narg.text; *p; p++) { |
954 | switch ((unsigned char)*p) { | 954 | switch ((unsigned char)*p) { |
955 | case CTLESC: | 955 | case CTLESC: |
956 | putc(*++p, fp); | 956 | p++; |
957 | putc(*p, fp); | ||
957 | break; | 958 | break; |
958 | case CTLVAR: | 959 | case CTLVAR: |
959 | putc('$', fp); | 960 | putc('$', fp); |
@@ -962,8 +963,10 @@ sharg(union node *arg, FILE *fp) | |||
962 | if (subtype == VSLENGTH) | 963 | if (subtype == VSLENGTH) |
963 | putc('#', fp); | 964 | putc('#', fp); |
964 | 965 | ||
965 | while (*p != '=') | 966 | while (*p != '=') { |
966 | putc(*p++, fp); | 967 | putc(*p, fp); |
968 | p++; | ||
969 | } | ||
967 | 970 | ||
968 | if (subtype & VSNUL) | 971 | if (subtype & VSNUL) |
969 | putc(':', fp); | 972 | putc(':', fp); |