about summary refs log tree commit diff
path: root/Src/glob.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2014-08-20 23:40:21 +0200
committerMikael Magnusson <mikachu@gmail.com>2014-08-21 01:23:32 +0200
commit33ad7174f6531c1e9052c71609c9084dfb35a2d8 (patch)
tree2e38656a328bcba8f1b4a67baf0bd56ba3cf0a10 /Src/glob.c
parente5b504b97586d6a5c336a51ed4d0add4cc95ce51 (diff)
downloadzsh-33ad7174f6531c1e9052c71609c9084dfb35a2d8.tar.gz
zsh-33ad7174f6531c1e9052c71609c9084dfb35a2d8.tar.xz
zsh-33ad7174f6531c1e9052c71609c9084dfb35a2d8.zip
33038: Fix {^@..a} hanging
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c
index 627166c7a..cb853870a 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2219,7 +2219,7 @@ xpandbraces(LinkList list, LinkNode *np)
 	    uremnode(list, node);
 	    strp = str - str3;
 	    lenalloc = strp + strlen(str2+1) + 1;
-	    for (; cend >= cstart; cend--) {
+	    do {
 #ifdef MULTIBYTE_SUPPORT
 		char *ncptr;
 		int nclen;
@@ -2239,7 +2239,7 @@ xpandbraces(LinkList list, LinkNode *np)
 		insertlinknode(list, last, p);
 		if (rev)	/* decreasing:  add in reverse order. */
 		    last = nextnode(last);
-	    }
+	    } while (cend-- > cstart);
 	    *np = nextnode(olast);
 	    return;
 	}