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;
value = tok;
#endif
+ last_command_exit_value = EXECUTION_FAILURE;
err_unboundvar (value);
#if defined (ARRAY_VARS)
#if defined (ARRAY_VARS)
if (c == '[')
{
- e = skipsubscript (cp, 0);
+ e = skipsubscript (cp, 0, 0);
if (cp[e] == ']')
{
cp += e + 1;