]> granicus.if.org Git - php/commitdiff
fix #69628: complex GLOB_BRACE fails on Windows
authorChristoph M. Becker <cmbecker69@gmx.de>
Wed, 13 May 2015 21:47:54 +0000 (23:47 +0200)
committerAnatol Belski <ab@php.net>
Thu, 21 May 2015 07:44:15 +0000 (09:44 +0200)
win32/glob.c

index 8111daba1c4e5ed2a0b24cd72767df3170e16785..a61c4f3ef0a841bf3c98de9f37ee64e0b8ed6f1e 100644 (file)
@@ -293,17 +293,19 @@ globexp2(ptr, pattern, pglob, rv)
        }
 
        for (i = 0, pl = pm = ptr; pm <= pe; pm++) {
+               const Char *pb;
+
                switch (*pm) {
                case LBRACKET:
                        /* Ignore everything between [] */
-                       for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
+                       for (pb = pm++; *pm != RBRACKET && *pm != EOS; pm++)
                                ;
                        if (*pm == EOS) {
                                /*
                                 * We could not find a matching RBRACKET.
                                 * Ignore and just look for RBRACE
                                 */
-                               pm = pl;
+                               pm = pb;
                        }
                        break;