From aea33a6b25512c901b414e86a0e8d2b4d9c7ae28 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Wed, 7 Dec 2011 09:10:32 -0500 Subject: [PATCH] commit bash-20070719 snapshot --- lib/readline/input.c | 2 +- subst.c | 2 -- variables.c | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/readline/input.c b/lib/readline/input.c index 607f5e261..cd8233585 100644 --- a/lib/readline/input.c +++ b/lib/readline/input.c @@ -578,7 +578,7 @@ _rl_read_mbstring (first, mb, mlen) c = first; memset (mb, 0, mlen); - for (i = 0; c > 0 && i < mlen; i++) + for (i = 0; c >= 0 && i < mlen; i++) { mb[i] = (char)c; memset (&ps, 0, sizeof (mbstate_t)); diff --git a/subst.c b/subst.c index a71229f27..fcf221cb9 100644 --- a/subst.c +++ b/subst.c @@ -163,8 +163,6 @@ int allow_null_glob_expansion; /* Non-zero means to throw an error when globbing fails to match anything. */ int fail_glob_expansion; -int assigining_in_environment; - #if 0 /* Variables to keep track of which words in an expanded word list (the output of expand_word_list_internal) are the result of globbing diff --git a/variables.c b/variables.c index b8645aa35..a7c8eb03c 100644 --- a/variables.c +++ b/variables.c @@ -1861,10 +1861,10 @@ make_variable_value (var, value, flags) } rval = evalexp (value, &expok); if (expok == 0) - { - top_level_cleanup (); + { + top_level_cleanup (); jump_to_top_level (DISCARD); - } + } if (flags & ASS_APPEND) rval += lval; retval = itos (rval); -- 2.47.3