aboutsummaryrefslogtreecommitdiff
path: root/contrib
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
commit90eb3b443db05cae61a464a1518d3ec849f70cee (patch)
tree5f245d085c960b236fd137978cb9b4227df6d399 /contrib
parent66257bc8d931fa71e7a6186d280f0966cd9192a4 (diff)
parent9a5e6371241e3d4a2a5727e73f02896c8ed421a5 (diff)
downloadsrc-90eb3b443db05cae61a464a1518d3ec849f70cee.tar.gz
src-90eb3b443db05cae61a464a1518d3ec849f70cee.zip
Notes
Diffstat (limited to 'contrib')
-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);