about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-05-13 09:51:05 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-05-13 09:51:05 +0200
commitf0c2cf8607dd055f2b8aaa98664f7328108f2c65 (patch)
tree00f913deb737ffcb567ac43f538dc4401e54a625
parentc636c4b3b90ac397d77b492f228719745ed15e3a (diff)
downloadzsh-f0c2cf8607dd055f2b8aaa98664f7328108f2c65.tar.gz
zsh-f0c2cf8607dd055f2b8aaa98664f7328108f2c65.tar.xz
zsh-f0c2cf8607dd055f2b8aaa98664f7328108f2c65.zip
42760: move stack variable outside while loop scope as it is accessed in the while condition
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_thingy.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b3c9d4c4..485d4a254 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-13  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+	* 42760: Src/Zle/zle_thingy.c: move stack variable outside
+	while loop scope as it is accessed in the while condition
+
 2018-05-11  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 42180: dana: Src/Zle/compcore.c: safety when removing
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 5601c1178..6b892b822 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -725,13 +725,13 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 	remetafy = 0;
 
     while (*args && **args == '-') {
+	char skip_this_arg[2] = "x";
 	char *num;
 	if (!args[0][1] || args[0][1] == '-') {
 	    args++;
 	    break;
 	}
 	while (*++(*args)) {
-	    char skip_this_arg[2] = "x";
 	    switch (**args) {
 	    case 'n':
 		num = args[0][1] ? args[0]+1 : args[1];