We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abbebd3 commit 69f52e8Copy full SHA for 69f52e8
src/gnuwin32/dos_wglob.c
@@ -598,7 +598,8 @@ glob0(const wchar_t *pattern, wglob_t *pglob)
598
pglob->gl_flags = oldflags;
599
return(globextend(qpat, pglob, &limit));
600
}
601
- else if (!(pglob->gl_flags & GLOB_NOSORT))
+ else if (!(pglob->gl_flags & GLOB_NOSORT) &&
602
+ (pglob->gl_pathc - oldpathc) > 0)
603
qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
604
pglob->gl_pathc - oldpathc, sizeof(wchar_t *),
605
(pglob->gl_flags & (GLOB_ALPHASORT|GLOB_NOCASE))
0 commit comments