From 68b705eda289521adc5ca96dd7c2e91371c074f0 Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Sat, 10 Nov 2007 17:35:41 +0000 Subject: Merge of 23051: using ${(Q)...} on an expression with RCQUOTE handling failed when DEBUG was defined. --- Src/lex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Src') diff --git a/Src/lex.c b/Src/lex.c index 52b6885af..5b001c4eb 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; -- cgit 1.4.1