Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Fix {^@..a} hanging
- X-seq: zsh-workers 33038
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Fix {^@..a} hanging
- Date: Thu, 21 Aug 2014 00:08:47 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=7FoY+GgMYuc9V790We1nFCwX2VQa2uh4ctBnMtpZII4=; b=OJfgQWCOJDOxmHDQcrhxH4irgxOf59vJTflYpGSyWGVJvNncQUk8v+zj5Y2vEBGkpw uDxnSiOf//ZhLDCe35HIuXkLtYiEfl+JtsRKA1WHej8JqJAGxIsihX7NrMzVZk4STMeh tKLHcM7QQkVivP+wu/wD/F7anb8WlrW45Fve/tOasf4bZWeulqYuE6dkyNvshN2KJ5Y4 fi0I98lx2xKL6izVupc3FzMaj9FfOGvphZL2Usb0motyPq901y41AxD7MIjaj53ls7T8 j87HBkt7c5++8eI2Wy3WO41HzVwF5f3xFbd7uqt5lxI7hsEGQY0Rs06ZP85cumKWy1vm FBvg==
- In-reply-to: <CAHYJk3RrEgxD6R8JEd+diwP=QuYXX=5SLGpS71ad+CqhH_jOVA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3RrEgxD6R8JEd+diwP=QuYXX=5SLGpS71ad+CqhH_jOVA@mail.gmail.com>
This should work for all possible cases, and is fine since we always
want to enter the loop at least once anyway.
---
Src/glob.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Src/glob.c b/Src/glob.c
index 3bf66e4..bf758d4 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2228,7 +2228,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;
@@ -2248,7 +2248,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;
}
--
1.9.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author