Skip to content

Commit e42aae1

Browse files
committed
fix #69628: complex GLOB_BRACE fails on Windows
1 parent 43315f3 commit e42aae1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

win32/glob.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,19 @@ globexp2(ptr, pattern, pglob, rv)
293293
}
294294

295295
for (i = 0, pl = pm = ptr; pm <= pe; pm++) {
296+
const Char *pb;
297+
296298
switch (*pm) {
297299
case LBRACKET:
298300
/* Ignore everything between [] */
299-
for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
301+
for (pb = pm++; *pm != RBRACKET && *pm != EOS; pm++)
300302
;
301303
if (*pm == EOS) {
302304
/*
303305
* We could not find a matching RBRACKET.
304306
* Ignore and just look for RBRACE
305307
*/
306-
pm = pl;
308+
pm = pb;
307309
}
308310
break;
309311

0 commit comments

Comments
 (0)