1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

Fix ${#varname} (getting length of string) when in double-quotes.

Approved-by:	jkh

PR:		bin/12137
Submitted by:	"Danny J. Zerkel" <dzerkel@columbus.rr.com>
This commit is contained in:
Martin Cracauer 2000-02-15 08:00:11 +00:00
parent 01ce53ab1c
commit c11e75cfcf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57225

View File

@ -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)