From c11e75cfcf597bc93196026819fb9624689b439d Mon Sep 17 00:00:00 2001 From: Martin Cracauer Date: Tue, 15 Feb 2000 08:00:11 +0000 Subject: [PATCH] Fix ${#varname} (getting length of string) when in double-quotes. Approved-by: jkh PR: bin/12137 Submitted by: "Danny J. Zerkel" --- bin/sh/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 3b93bd9b987..2aa2665e015 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1248,7 +1248,7 @@ badsub: synerror("Bad substitution"); } else { pungetc(); } - if (dblquote || arinest) + if (subtype != VSLENGTH && (dblquote || arinest)) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; if (subtype != VSNORMAL)