From e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 21 Sep 2018 16:29:07 +0100 Subject: 43511: Initialiase alias entry on input stack. This didn't happen if neither history nor alias expansion was in use. --- Src/input.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Src') diff --git a/Src/input.c b/Src/input.c index 9787dedf6..e9989ffe4 100644 --- a/Src/input.c +++ b/Src/input.c @@ -555,6 +555,7 @@ inpush(char *str, int flags, Alias inalias) if ((instacktop->alias = inalias)) inalias->inuse = 1; } else { + instacktop->alias = NULL; /* If we are continuing an alias expansion, record the alias * expansion in new set of flags (do we need this?) */ @@ -691,6 +692,7 @@ char *input_hasalias(void) { if (!(flags & INP_CONT)) break; + DPUTS(instackptr == instack, "BUG: continuation at bottom of instack"); instackptr--; if (instackptr->alias) return instackptr->alias->node.nam; -- cgit 1.4.1