diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-21 20:51:19 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-21 20:51:19 -0500 |
commit | 0001803f0b9523c94fa2ede48eaecb047fef4524 (patch) | |
tree | f334332811e033ff966d94f6268f0629a94304b3 /expr.c | |
parent | 89a92869e56aba4e4cab2d639c00a86f0545c862 (diff) | |
download | bash-0001803f0b9523c94fa2ede48eaecb047fef4524.tar.gz |
Bash-4.1 distribution source
Diffstat (limited to 'expr.c')
-rw-r--r-- | expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -202,7 +202,7 @@ static int expr_depth; /* Location in the stack. */ static int expr_stack_size; /* Number of slots already allocated. */ extern char *this_command_name; -extern int unbound_vars_is_error; +extern int unbound_vars_is_error, last_command_exit_value; #if defined (ARRAY_VARS) extern const char * const bash_badsub_errmsg; @@ -923,6 +923,7 @@ expr_streval (tok, e) value = tok; #endif + last_command_exit_value = EXECUTION_FAILURE; err_unboundvar (value); #if defined (ARRAY_VARS) @@ -1057,7 +1058,7 @@ readtok () #if defined (ARRAY_VARS) if (c == '[') { - e = skipsubscript (cp, 0); + e = skipsubscript (cp, 0, 0); if (cp[e] == ']') { cp += e + 1; |