From eada7e1138a3fca90f085dd764ad86098e58c9ac Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 20 Jun 2018 12:09:43 +0100 Subject: 43077: Fix shift builtin status. If the math evaulation to get the shift count failed the status wasn't passed back from the builtin. --- Src/builtin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 1cba97dec..93fa9112c 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5318,8 +5318,13 @@ bin_shift(char *name, char **argv, Options ops, UNUSED(int func)) /* optional argument can be either numeric or an array */ queue_signals(); - if (*argv && !getaparam(*argv)) + if (*argv && !getaparam(*argv)) { num = mathevali(*argv++); + if (errflag) { + unqueue_signals(); + return 1; + } + } if (num < 0) { unqueue_signals(); -- cgit 1.4.1