From: Jeremy Allison Date: Fri, 3 Sep 2004 17:44:27 +0000 (+0000) Subject: r2213: Optimisation. Passes masktest against W2K3. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5831 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5dc3324c4f1ae10c96b6d385531369e0eeee4c40;p=thirdparty%2Fsamba.git r2213: Optimisation. Passes masktest against W2K3. Jeremy. --- diff --git a/source/lib/ms_fnmatch.c b/source/lib/ms_fnmatch.c index 24232c3b523..42c91bd18df 100644 --- a/source/lib/ms_fnmatch.c +++ b/source/lib/ms_fnmatch.c @@ -179,6 +179,9 @@ static int ms_fnmatch_w(const smb_ucs2_t *pattern, const smb_ucs2_t *string, break; case UCS2_CHAR('*'): + while (*p == UCS2_CHAR('*')) { + p++; + } for (; *n; n++) { if (ms_fnmatch_w(p, n, protocol, case_sensitive) == 0) return 0; }