about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-12-13 18:49:06 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-12-13 18:49:06 +0000
commitf50dfd61f66d61d17c2ae14e03f32a502da577fa (patch)
tree2c27aa297d2a075920179a600c48547fcfb83f0b
parentb8108d295f18b45c802114db1fe82cb770a15691 (diff)
downloadzsh-f50dfd61f66d61d17c2ae14e03f32a502da577fa.tar.gz
zsh-f50dfd61f66d61d17c2ae14e03f32a502da577fa.tar.xz
zsh-f50dfd61f66d61d17c2ae14e03f32a502da577fa.zip
23051: ${(Q)...} of RCQUOTE expression failed with DEBUG active
-rw-r--r--ChangeLog5
-rw-r--r--Src/lex.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cf2ff621..390e0f017 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-13  Peter Stephenson  <pws@csr.com>
+
+	* 23051: Src/lex.c: using ${(Q)...} on an expression with
+	RCQUOTE handling failed when DEBUG was defined.
+
 2006-12-12  Peter Stephenson  <pws@csr.com>
 
 	* users/11079: Doc/Zsh/expn.yo: point out that 1(2##) may not
diff --git a/Src/lex.c b/Src/lex.c
index 57b752309..a568e25c4 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1536,9 +1536,13 @@ parse_subst_string(char *s)
 	return 1;
     }
 #ifdef DEBUG
-    if (c != STRING || olen != l || errflag) {
+    /*
+     * Historical note: we used to check here for olen == l, but
+     * that's not necessarily the case if we stripped an RCQUOTE.
+     */
+    if (c != STRING || errflag) {
 	fprintf(stderr, "Oops. Bug in parse_subst_string: %s\n",
-		olen < l ? "len < l" : errflag ? "errflag" : "c != STRING");
+		errflag ? "errflag" : "c != STRING");
 	fflush(stderr);
 	untokenize(s);
 	return 1;