aboutsummaryrefslogtreecommitdiff
path: root/src/tool_urlglob.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-12-16 00:51:22 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-12-16 00:51:39 +0100
commit9b61060ffce31f6511ab1984fcaba51b2a626615 (patch)
treed544a47de537ec16081e89cc3d03e66b8fc7b5db /src/tool_urlglob.c
parent5590a3f1794c537a6bdd52f4c88302deb7312b04 (diff)
tool_urlglob.c: partly reverse dc19789444
The loop in glob_next_url() needs to be done backwards to maintain the logic. dc19789444 caused test 1235 to fail.
Diffstat (limited to 'src/tool_urlglob.c')
-rw-r--r--src/tool_urlglob.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index 5a7fbe0c7..bfbb781ee 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -495,9 +495,9 @@ int glob_next_url(char **globbed, URLGlob *glob)
else {
bool carry = TRUE;
- /* implement a counter over the index ranges of all patterns,
- starting with the leftmost pattern */
- for(i = 0; carry && (i < glob->size); i++) {
+ /* implement a counter over the index ranges of all patterns, starting
+ with the rightmost pattern */
+ for(i = glob->size - 1; carry && (i < glob->size); --i) {
carry = FALSE;
pat = &glob->pattern[i];
switch (pat->type) {