summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2008-03-12 23:01:33 +0000
committerXin LI <delphij@FreeBSD.org>2008-03-12 23:01:33 +0000
commit9a5e6371241e3d4a2a5727e73f02896c8ed421a5 (patch)
tree35061d37a02346eb49986c0acdfe36b69d17be1b
parent1dd6018d3b9b7095a4a97c68754bd872e0f22186 (diff)
downloadsrc-test2-9a5e6371241e3d4a2a5727e73f02896c8ed421a5.tar.gz
src-test2-9a5e6371241e3d4a2a5727e73f02896c8ed421a5.zip
Notes
-rw-r--r--contrib/tcsh/sh.lex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/tcsh/sh.lex.c b/contrib/tcsh/sh.lex.c
index 0cccf4716059..8eccb4d3e293 100644
--- a/contrib/tcsh/sh.lex.c
+++ b/contrib/tcsh/sh.lex.c
@@ -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);