summaryrefslogtreecommitdiff
path: root/ext/File/Glob/bsd_glob.c
diff options
context:
space:
mode:
authorSlaven Rezic <slaven@rezic.de>2007-02-03 00:08:28 +0100
committerNicholas Clark <nick@ccl4.org>2007-02-02 23:35:22 +0000
commit77348331ba668328554e7a9d261f69ef327189e7 (patch)
treef4e7580b7ceeb5f6b911124430d073e77fd6d78a /ext/File/Glob/bsd_glob.c
parent6502358f02d6c4ea5159a32e117a91663131f6af (diff)
downloadperl-77348331ba668328554e7a9d261f69ef327189e7.tar.gz
Re: [perl #41421] glob() produces spurious results with brackets in braces
Message-ID: <87r6t81acj.fsf@biokovo.herceg.de> Date: 02 Feb 2007 23:08:28 +0100 p4raw-id: //depot/perl@30103
Diffstat (limited to 'ext/File/Glob/bsd_glob.c')
-rw-r--r--ext/File/Glob/bsd_glob.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/File/Glob/bsd_glob.c b/ext/File/Glob/bsd_glob.c
index 4d1e7f0695..c6fce1e205 100644
--- a/ext/File/Glob/bsd_glob.c
+++ b/ext/File/Glob/bsd_glob.c
@@ -431,7 +431,7 @@ globexp2(const Char *ptr, const Char *pattern,
{
int i;
Char *lm, *ls;
- const Char *pe, *pm, *pl;
+ const Char *pe, *pm, *pm1, *pl;
Char patbuf[MAXPATHLEN];
/* copy part up to the brace */
@@ -471,14 +471,14 @@ globexp2(const Char *ptr, const Char *pattern,
switch (*pm) {
case BG_LBRACKET:
/* Ignore everything between [] */
- for (pl = pm++; *pm != BG_RBRACKET && *pm != BG_EOS; pm++)
+ for (pm1 = pm++; *pm != BG_RBRACKET && *pm != BG_EOS; pm++)
;
if (*pm == BG_EOS) {
/*
* We could not find a matching BG_RBRACKET.
* Ignore and just look for BG_RBRACE
*/
- pm = pl;
+ pm = pm1;
}
break;