summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-03-12 23:01:33 +0000
committerdelphij <delphij@FreeBSD.org>2008-03-12 23:01:33 +0000
commite863b68dceedacef4fea511d5f1e2c5666b2b2ee (patch)
tree35061d37a02346eb49986c0acdfe36b69d17be1b /contrib/tcsh
parent5174ae62f98b1daa4649059d8e7db5d3c8a296a0 (diff)
downloadFreeBSD-src-e863b68dceedacef4fea511d5f1e2c5666b2b2ee.zip
FreeBSD-src-e863b68dceedacef4fea511d5f1e2c5666b2b2ee.tar.gz
Reapply a bugfix that was done as sh.lex.c,v 1.1.1.8
Diffstat (limited to 'contrib/tcsh')
-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 0cccf47..8eccb4d 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);
OpenPOWER on IntegriCloud