diff options
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r-- | bin/sh/expand.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index a0b172e..b03cc3b 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -502,13 +502,14 @@ expbackq(union node *cmd, int quoted, int flag) if (lastc == '\n') { nnl++; } else { + CHECKSTRSPACE(nnl + 2, dest); while (nnl > 0) { nnl--; - STPUTC('\n', dest); + USTPUTC('\n', dest); } if (quotes && syntax[(int)lastc] == CCTL) - STPUTC(CTLESC, dest); - STPUTC(lastc, dest); + USTPUTC(CTLESC, dest); + USTPUTC(lastc, dest); } } } |