about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-05-15 09:58:17 +0100
committerPeter Stephenson <pws@zsh.org>2015-05-15 09:58:17 +0100
commit59a874f94eea24f3697356d536541aa80b7068bf (patch)
treecce53405be35f3484724b4eb30f5424cd74c51c2
parente86720190efc6550086e6a733394cb393cd0da4d (diff)
downloadzsh-59a874f94eea24f3697356d536541aa80b7068bf.tar.gz
zsh-59a874f94eea24f3697356d536541aa80b7068bf.tar.xz
zsh-59a874f94eea24f3697356d536541aa80b7068bf.zip
35151: improved check for parameter q and b flags
-rw-r--r--ChangeLog2
-rw-r--r--Src/subst.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e23f314ed..48eda44cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-05-15  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 35151: Src/subst.c: improved check for both b and q flags.
+
 	* 35131: Src/pattern.c: "[]" in a pattern is treated as an empty
 	character set (matching nothing) if there are no more active "]"
 	is in the pattern.
diff --git a/Src/subst.c b/Src/subst.c
index bf80495bd..5a12e127f 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -1845,7 +1845,8 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
 		    break;
 
 		case 'q':
-		    if (quotetype == QT_DOLLARS)
+		    if (quotetype == QT_DOLLARS ||
+			quotetype == QT_BACKSLASH_PATTERN)
 			goto flagerr;
 		    if (s[1] == '-') {
 			if (quotemod)