diff options
Diffstat (limited to 'strings/apr_fnmatch.c')
-rw-r--r-- | strings/apr_fnmatch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c index 1773105d4..0b00846e5 100644 --- a/strings/apr_fnmatch.c +++ b/strings/apr_fnmatch.c @@ -118,8 +118,8 @@ static APR_INLINE int fnmatch_ch(const char **pattern, const char **string, int leadingclosebrace: /* Look at only well-formed range patterns; * "x-]" is not allowed unless escaped ("x-\]") + * XXX: Fix for locale/MBCS character width */ - /* XXX: Fix for locale/MBCS character width */ if (((*pattern)[1] == '-') && ((*pattern)[2] != ']')) { startch = *pattern; @@ -370,12 +370,12 @@ APR_DECLARE(int) apr_fnmatch(const char *pattern, const char *string, int flags) } } - if (*string && (!slash || (*string != '/'))) + if (*string && !(slash && (*string == '/'))) return APR_FNM_NOMATCH; - if (*pattern && (!slash || ((*pattern != '/') - && (!escape || (*pattern != '\\') - || (pattern[1] != '/'))))) + if (*pattern && !(slash && ((*pattern == '/') + || (escape && (*pattern == '\\') + && (pattern[1] == '/'))))) return APR_FNM_NOMATCH; } |