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.
---
ChangeLog | 5 +++++
Src/input.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 87d6e9c3e..9c94f2d57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-21 Peter Stephenson
+
+ * 43511: Src/input.c: alias entry on input stack wasn't
+ initialised if not expanding alias or using history.
+
2018-09-19 Maximilian Bosch
* 43502: Completion/X/Command/_setxkbmap: Search XDG_DATA_DIRS
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 v1.2.3-70-g09d2