From f4b417c62a4f272c4cf9a074d0f7a3a97201f9db Mon Sep 17 00:00:00 2001
From: Sebastian Schmidt <yath@yath.de>
Date: Tue, 17 Apr 2012 11:23:35 +0200
Subject: Update to upstream bash 4.2

This upgrades bash to from 4.1-rc to 4.2-release. See CWRU/changelog for
changes.

Change-Id: I926269c300cf44fa25964b5b375a148fcf11c4b7
---
 builtins/getopts.def | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'builtins/getopts.def')

diff --git a/builtins/getopts.def b/builtins/getopts.def
index c077c8e..1d2a68a 100644
--- a/builtins/getopts.def
+++ b/builtins/getopts.def
@@ -108,7 +108,9 @@ getopts_bind_variable (name, value)
   if (legal_identifier (name))
     {
       v = bind_variable (name, value, 0);
-      return (v && (readonly_p (v) == 0)) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
+      if (v && (readonly_p (v) || noassign_p (v)))
+	return (EX_MISCERROR);
+      return (v ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
     }
   else
     {
-- 
cgit v1.1

