mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 15:43:18 +02:00
commit bash-20141128 snapshot
This commit is contained in:
+5
-3
@@ -203,7 +203,7 @@ bind_array_variable (name, ind, value, flags)
|
||||
|
||||
if (entry == (SHELL_VAR *) 0)
|
||||
entry = make_new_array_variable (name);
|
||||
else if (readonly_p (entry) || noassign_p (entry))
|
||||
else if ((readonly_p (entry) && (flags&ASS_FORCE) == 0) || noassign_p (entry))
|
||||
{
|
||||
if (readonly_p (entry))
|
||||
err_readonly (name);
|
||||
@@ -237,7 +237,7 @@ bind_assoc_variable (entry, name, key, value, flags)
|
||||
SHELL_VAR *dentry;
|
||||
char *newval;
|
||||
|
||||
if (readonly_p (entry) || noassign_p (entry))
|
||||
if ((readonly_p (entry) && (flags&ASS_FORCE) == 0) || noassign_p (entry))
|
||||
{
|
||||
if (readonly_p (entry))
|
||||
err_readonly (name);
|
||||
@@ -498,7 +498,9 @@ assign_compound_array_list (var, nlist, flags)
|
||||
|
||||
for (list = nlist; list; list = list->next)
|
||||
{
|
||||
iflags = flags;
|
||||
/* Don't allow var+=(values) to make assignments in VALUES append to
|
||||
existing values by default. */
|
||||
iflags = flags & ~ASS_APPEND;
|
||||
w = list->word->word;
|
||||
|
||||
/* We have a word of the form [ind]=value */
|
||||
|
||||
Reference in New Issue
Block a user