diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2023-02-02 10:09:21 +0000 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2023-02-02 10:09:21 +0000 |
commit | 21baad1037c1aa85384a81dd77a4661676336133 (patch) | |
tree | 1b7dfbabb4e5c5b17a347f5137d1bf11b07ab14c /Src/input.c | |
parent | c8c894f83fbb07b4f65b2ac8db639680062b25d9 (diff) | |
download | zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.gz zsh-21baad1037c1aa85384a81dd77a4661676336133.tar.xz zsh-21baad1037c1aa85384a81dd77a4661676336133.zip |
51307: Improve error on attempt to define function from aliased name
Diffstat (limited to 'Src/input.c')
-rw-r--r-- | Src/input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/input.c b/Src/input.c index 5a612669b..0da065e51 100644 --- a/Src/input.c +++ b/Src/input.c @@ -816,6 +816,7 @@ char *input_hasalias(void) { int flags = inbufflags; struct instacks *instackptr = instacktop; + char *alias_nam = NULL; for (;;) { @@ -824,9 +825,9 @@ char *input_hasalias(void) DPUTS(instackptr == instack, "BUG: continuation at bottom of instack"); instackptr--; if (instackptr->alias) - return instackptr->alias->node.nam; + alias_nam = instackptr->alias->node.nam; flags = instackptr->flags; } - return NULL; + return alias_nam; } |