From cecc2b38f1d3ed2c29487bd4fcfd38487095661d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 3 Sep 2004 17:44:07 +0000 Subject: r2212: Optimisation. Passes masktest against W2K3. Jeremy. (This used to be commit fb7a529c4c65788c307c1043cf2b664059ed8c2a) --- source4/lib/ms_fnmatch.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/ms_fnmatch.c') diff --git a/source4/lib/ms_fnmatch.c b/source4/lib/ms_fnmatch.c index dd015a0ac8..1c4b3d1806 100644 --- a/source4/lib/ms_fnmatch.c +++ b/source4/lib/ms_fnmatch.c @@ -173,6 +173,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) == 0) return 0; } -- cgit