r2213: Optimisation. Passes masktest against W2K3.
authorJeremy Allison <jra@samba.org>
Fri, 3 Sep 2004 17:44:27 +0000 (17:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:36 +0000 (10:52 -0500)
Jeremy.

source/lib/ms_fnmatch.c

index 24232c3b523b1293e32f43b2e0c24574aa008324..42c91bd18df9067048f801c3e2bf3c351185649c 100644 (file)
@@ -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;
                        }