Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: grammar triviality with '&&'



On Wed, 4 Mar 2015 23:05:44 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> > Now waiting for obscure failures elsewhere...
> 
> All I have to do is press ctrl-c at a prompt, and it crashes:

It's amazing what you can do if you try.

It appears we have to avoid expanding null pointers.

One day, someone is going to have the delightful experience of writing
more interactive tests.

pws

diff --git a/Src/lex.c b/Src/lex.c
index a076614..494ea88 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1735,6 +1735,9 @@ checkalias(void)
 {
     Alias an;
 
+    if (!zshlextext)
+	return 0;
+
     if (!noaliases && isset(ALIASESOPT) &&
 	(!isset(POSIXALIASES) ||
 	 !reswdtab->getnode(reswdtab, zshlextext))) {



Messages sorted by: Reverse Date, Date, Thread, Author