diff options
author | Denys Vlasenko | 2021-07-11 12:51:43 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-07-11 12:51:43 +0200 |
commit | 39aabfe8f033c9c62acf676b660dc979714d26a7 (patch) | |
tree | c6d6cc7445850240bebe9deddddd124d9e5453e8 /editors | |
parent | 4ef8841b21e27e7c7f58d3c9901c833b4fa5a862 (diff) | |
download | busybox-39aabfe8f033c9c62acf676b660dc979714d26a7.zip busybox-39aabfe8f033c9c62acf676b660dc979714d26a7.tar.gz |
awk: unbreak "cmd" | getline
function old new delta
evaluate 3337 3343 +6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/awk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/awk.c b/editors/awk.c index e765d3f..6c60a06 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -3156,7 +3156,8 @@ static var *evaluate(node *op, var *res) if (op1) { rsm = newfile(L.s); if (!rsm->F) { - if (opinfo == TI_PGETLINE) { + /* NB: can't use "opinfo == TI_PGETLINE", would break "cmd" | getline */ + if ((opinfo & OPCLSMASK) == OC_PGETLINE) { rsm->F = popen(L.s, "r"); rsm->is_pipe = TRUE; } else { |