diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-20 08:59:19 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-20 08:59:19 +0000 |
commit | 310ab79f5392f102ab0ef0434c8e25f203f9a287 (patch) | |
tree | 8315d351ba7e821529d9bcd17f9dec2ea67b65d9 /dir.c | |
parent | 81c378400434dd15989a4b22d812cf2f78e6104f (diff) |
merge revision(s) 49532:
dir.c: fix escaping multibyte char
* dir.c (has_magic): fix escaping multibyte char, with glob
meta-char in trailing bytes, e.g., Shift-JIS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1208,9 +1208,9 @@ has_magic(const char *p, const char *pend, int flags, rb_encoding *enc) return MAGICAL; case '\\': - if (escape && !(c = *p++)) - return PLAIN; - continue; + if (escape && p++ >= pend) + continue; + break; #ifdef _WIN32 case '.': |