diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-24 00:22:24 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-24 00:22:24 +0100 |
| commit | 51a471d05d637e928ed26b0240645ff3e51ef396 (patch) | |
| tree | 913ee15f3b32bb2029e9d1d3c39c68a13147dfd7 /shell | |
| parent | 521220ed1aa63e53e2f30042ae8f00f683e2254d (diff) | |
| download | busybox-w32-51a471d05d637e928ed26b0240645ff3e51ef396.tar.gz busybox-w32-51a471d05d637e928ed26b0240645ff3e51ef396.tar.bz2 busybox-w32-51a471d05d637e928ed26b0240645ff3e51ef396.zip | |
ash: change "clear ungetc counter on syntax errors" fix to match dash
function old new delta
ash_main 1203 1210 +7
raise_exception 39 26 -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-13) Total: -6 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index aa2a93bca..f16d7fb6a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -636,8 +636,6 @@ raise_exception(int e) | |||
| 636 | abort(); | 636 | abort(); |
| 637 | #endif | 637 | #endif |
| 638 | INT_OFF; | 638 | INT_OFF; |
| 639 | /* Prevent this: ";l" -> syntax error, then "s" -> runs "ls" */ | ||
| 640 | g_parsefile->unget = 0; | ||
| 641 | exception_type = e; | 639 | exception_type = e; |
| 642 | longjmp(exception_handler->loc, 1); | 640 | longjmp(exception_handler->loc, 1); |
| 643 | } | 641 | } |
| @@ -14161,6 +14159,7 @@ reset(void) | |||
| 14161 | /* from input.c: */ | 14159 | /* from input.c: */ |
| 14162 | g_parsefile->left_in_buffer = 0; | 14160 | g_parsefile->left_in_buffer = 0; |
| 14163 | g_parsefile->left_in_line = 0; /* clear input buffer */ | 14161 | g_parsefile->left_in_line = 0; /* clear input buffer */ |
| 14162 | g_parsefile->unget = 0; | ||
| 14164 | popallfiles(); | 14163 | popallfiles(); |
| 14165 | 14164 | ||
| 14166 | /* from var.c: */ | 14165 | /* from var.c: */ |
