summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2018-09-21 16:29:07 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2018-09-21 16:29:07 +0100
commite76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e (patch)
treed9bd3788e367d37cdb25ae3ab3b9ef74c5c06a22 /Src
parent624219e0e4cbfdfb286e707bd2853f2d7b6a4a7d (diff)
downloadzsh-e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e.tar.gz
zsh-e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e.tar.xz
zsh-e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e.zip
43511: Initialiase alias entry on input stack.
This didn't happen if neither history nor alias expansion was in use.
Diffstat (limited to 'Src')
-rw-r--r--Src/input.c2
1 files changed, 2 insertions, 0 deletions
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;