Reapply a bugfix that was done as sh.lex.c,v 1.1.1.8

This commit is contained in:
Xin LI 2008-03-12 23:01:33 +00:00
parent 1dd6018d3b
commit 9a5e637124
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/tcsh/dist/; revision=177128
svn path=/vendor/tcsh/6.15b/; revision=177130; tag=vendor/tcsh/6.15b

View File

@ -851,7 +851,8 @@ getsub(struct wordent *en)
return (en);
}
slhs.len = 0;
Strbuf_append(&slhs, lhsb.s);
if (lhsb.s != NULL && lhsb.len != 0)
Strbuf_append(&slhs, lhsb.s);
Strbuf_terminate(&slhs);
if (exclc)
en = dosub(sc, en, global);