summaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-16 15:48:25 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-16 15:48:25 +0000
commitc335637188e9223fe2e76f3a163567be286bd2b1 (patch)
tree4b256ee6349557ffbc127fa7c0b70cf0d03504ba /dir.c
parent3011c54cf06dbc25878a00a4d594704cdba23628 (diff)
downloadruby-c335637188e9223fe2e76f3a163567be286bd2b1.tar.gz
ruby-c335637188e9223fe2e76f3a163567be286bd2b1.tar.xz
ruby-c335637188e9223fe2e76f3a163567be286bd2b1.zip
* dir.c (bracket): fix escape handling for range character in bracket
of fnmatch pattern. e.g., '[a\-c]' should not match 'b'. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index be642d38e..ffe63cf88 100644
--- a/dir.c
+++ b/dir.c
@@ -109,7 +109,7 @@ bracket(
t1++;
if (!*t1)
return NULL;
- p += (r = rb_enc_mbclen(t1, pend, enc));
+ p = t1 + (r = rb_enc_mbclen(t1, pend, enc));
if (p[0] == '-' && p[1] != ']') {
const char *t2 = p + 1;
int r2;