diff options
-rw-r--r-- | shell/ash.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index d44de3319..55a79a7a6 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9189,8 +9189,9 @@ preadbuffer(void) | |||
9189 | 9189 | ||
9190 | while (g_parsefile->strpush) { | 9190 | while (g_parsefile->strpush) { |
9191 | #if ENABLE_ASH_ALIAS | 9191 | #if ENABLE_ASH_ALIAS |
9192 | if (parsenleft == -1 && g_parsefile->strpush->ap && | 9192 | if (parsenleft == -1 && g_parsefile->strpush->ap |
9193 | parsenextc[-1] != ' ' && parsenextc[-1] != '\t') { | 9193 | && parsenextc[-1] != ' ' && parsenextc[-1] != '\t' |
9194 | ) { | ||
9194 | return PEOA; | 9195 | return PEOA; |
9195 | } | 9196 | } |
9196 | #endif | 9197 | #endif |
@@ -9314,6 +9315,9 @@ pfgets(char *line, int len) | |||
9314 | static void | 9315 | static void |
9315 | pungetc(void) | 9316 | pungetc(void) |
9316 | { | 9317 | { |
9318 | /* check is needed for ash -c 'echo 5&' + BASH_COMPAT to work */ | ||
9319 | if (parsenleft < 0) | ||
9320 | return; | ||
9317 | parsenleft++; | 9321 | parsenleft++; |
9318 | parsenextc--; | 9322 | parsenextc--; |
9319 | } | 9323 | } |