From 27bf8f1deabda87d07a8b9c7e21b59484f1a197e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 27 Sep 2007 17:10:14 +0200 Subject: set last_return_code to rcode and not 1 or 0 --- common/hush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/hush.c') diff --git a/common/hush.c b/common/hush.c index c7c9ced8ec..9ad9542f7a 100644 --- a/common/hush.c +++ b/common/hush.c @@ -682,7 +682,7 @@ static int run_list_real(struct pipe *pi) last_return_code = -rcode - 2; return -2; /* exit */ } - last_return_code=(rcode == 0) ? 0 : 1; + last_return_code=rcode; if ( rmode == RES_IF || rmode == RES_ELIF ) next_if_code=rcode; /* can be overwritten a number of times */ if (rmode == RES_WHILE) -- cgit v1.2.3