Author: pschweitzer Date: Sat Sep 27 12:08:17 2008 New Revision: 36549
URL: http://svn.reactos.org/svn/reactos?rev=36549&view=rev Log: Patch by Cecill Etheredge ijsf@gmx.net Fix 2nd stage and fix some typos. See issue #3748 for more details.
Modified: branches/pierre-fsd/ntoskrnl/fsrtl/name.c
Modified: branches/pierre-fsd/ntoskrnl/fsrtl/name.c URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/name.c... ============================================================================== --- branches/pierre-fsd/ntoskrnl/fsrtl/name.c [iso-8859-1] (original) +++ branches/pierre-fsd/ntoskrnl/fsrtl/name.c [iso-8859-1] Sat Sep 27 12:08:17 2008 @@ -250,7 +250,7 @@ * Check if the Name string is in the Expression string. * * @param Expression - * The string in which we've to find Name. It can contains wildcards + * The string in which we've to find Name. It can contain wildcards * * @param Name * The string to find. It cannot contain wildcards @@ -277,27 +277,27 @@ IN PWCHAR UpcaseTable OPTIONAL) { ULONG i, j, k = 0; - + ASSERT(!FsRtlDoesNameContainWildCards(Name));
for (i = 0 ; i < Expression->Length / sizeof(WCHAR) ; i++) { if ((FsRtlpUpcaseUnicodeChar(Expression->Buffer[i], IgnoreCase, UpcaseTable) == FsRtlpUpcaseUnicodeChar(Name->Buffer[k], IgnoreCase, UpcaseTable)) || - (Expression->Buffer[i] == '?') || (Expression->Buffer[i] == ANSI_DOS_QM) || - (Expression->Buffer[i] == ANSI_DOS_DOT && (Name->Buffer[k] == '.' || Name->Buffer[k] == '0'))) + (Expression->Buffer[i] == L'?') || (Expression->Buffer[i] == DOS_QM) || + (Expression->Buffer[i] == DOS_DOT && (Name->Buffer[k] == L'.' || Name->Buffer[k] == L'0'))) { k++; } - else if (Expression->Buffer[i] == '*') + else if (Expression->Buffer[i] == L'*') { k = Name->Length / sizeof(WCHAR); } - else if (Expression->Buffer[i] == ANSI_DOS_STAR) + else if (Expression->Buffer[i] == DOS_STAR) { for (j = k ; j < Name->Length / sizeof(WCHAR) ; j++) { - if (Name->Buffer[j] == '.') + if (Name->Buffer[j] == L'.') { k = j; break; @@ -308,7 +308,7 @@ { k = 0; } - if (k == Expression->Length / sizeof(WCHAR)) + if (k >= Expression->Length / sizeof(WCHAR)) { return TRUE; }